-
Notifications
You must be signed in to change notification settings - Fork 1
/
_button.scss
109 lines (91 loc) · 1.99 KB
/
_button.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
///
/// Stellar by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///
/* Button */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
@include vendor('appearance', 'none');
@include vendor('transition', (
'background-color #{_duration(transition)} ease-in-out',
'color #{_duration(transition)} ease-in-out'
));
border-radius: _size(border-radius);
border: 0;
cursor: pointer;
display: inline-block;
font-weight: _font(weight);
height: 2.75em;
line-height: 2.75em;
min-width: 9.25em;
padding: 0 1.5em;
text-align: center;
text-decoration: none;
white-space: nowrap;
&.icon {
padding-left: 1.35em;
&:before {
margin-right: 0.5em;
}
}
&.fit {
width: 100%;
}
&.small {
font-size: 0.8em;
}
&.large {
font-size: 1.35em;
}
&.disabled,
&:disabled {
@include vendor('pointer-events', 'none');
opacity: 0.25;
}
@include breakpoint('<=small') {
min-width: 0;
}
}
@mixin color-button($p: null) {
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
background-color: transparent;
box-shadow: inset 0 0 0 1px _palette($p, border);
color: _palette($p, fg-bold) !important;
&:hover {
background-color: _palette($p, border-bg);
}
&:active {
background-color: _palette($p, border2-bg);
}
&.icon {
&:before {
color: _palette($p, fg-light);
}
}
&.primary {
background-color: _palette(accent);
color: _palette(invert, bg) !important;
box-shadow: none;
&:hover {
background-color: lighten(_palette(accent), 3);
}
&:active {
background-color: darken(_palette(accent), 3);
}
&.icon {
&:before {
color: _palette(invert, bg) !important;
}
}
}
}
}
@include color-button;