-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_btn.scss
83 lines (74 loc) · 1.43 KB
/
_btn.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* Live at codepen - https://codepen.io/ammit/pen/rweVZG
*/
@mixin btn($bg: #ccc, $border-radius: 0, $pad: 16px, $danger: #f44336) {
display: inline-block;
vertical-align: middle;
user-select: none;
font-family: inherit;
outline: 0;
border: 1px solid darken($bg, 10%);
border-radius: $border-radius;
color: white;
background: $bg;
white-space: nowrap;
padding: $pad/1.5 $pad;
line-height: 1;
position: relative;
text-transform: uppercase;
text-decoration: none;
font-weight: regular;
font-size: 12px;
letter-spacing: 0.04em;
text-align: center;
&:not(.btn-disabled){
&:hover,
&:focus {
outline: 0;
background: lighten($bg, 5%);
}
&.active,
&:active {
background-image: none;
}
}
&-w-icon {
padding-left: $pad+$pad/1.5+16px !important;
position: relative;
}
&-danger {
background: lighten($danger, 5%);
border-color: $danger;
&:not(.btn-disabled){
&:hover,
&:active {
background: lighten($danger, 10%);
}
}
}
&-disabled {
&,
&:hover,
&:active {
opacity: 0.5;
pointer-events: none;
}
}
&-full {
width: 100%;
max-width: 100%;
}
svg {
position: absolute;
width: 20px;
height: 20px;
left: $pad;
top: 50%;
transform: translateY(-50%);
fill: $bg;
transition: fill 0.3s ease;
path {
fill: #fff;
}
}
}