-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mixins.scss
executable file
·69 lines (62 loc) · 1.77 KB
/
_mixins.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
/*
* Dashicons mixin
* use: @include dashicons( '\f140' );
*/
@mixin dashicons( $icon ) {
content: $icon;
font: normal 20px/1 'dashicons';
speak: none;
display: block;
padding: 0;
text-indent: 0;
text-align: center;
position: relative;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none !important;
}
/*
* Button mixin- creates 3d-ish button effect with correct
* highlights/shadows, based on a base color.
*/
@mixin button( $button-color, $text-color: white ) {
background: $button-color;
border-color: darken( $button-color, 10% ) darken( $button-color, 15% ) darken( $button-color, 15% );
color: $text-color;
box-shadow: 0 1px 0 darken( $button-color, 15% );
text-shadow: 0 -1px 1px darken( $button-color, 15% ),
1px 0 1px darken( $button-color, 15% ),
0 1px 1px darken( $button-color, 15% ),
-1px 0 1px darken( $button-color, 15% );
&:hover,
&:focus {
background: lighten( $button-color, 3% );
border-color: darken( $button-color, 15% );
color: $text-color;
box-shadow: 0 1px 0 darken( $button-color, 15% );
}
&:focus {
box-shadow: inset 0 1px 0 darken( $button-color, 10% ),
0 0 2px 1px #33b3db;
}
&:active {
background: darken( $button-color, 10% );
border-color: darken( $button-color, 15% );
box-shadow: inset 0 2px 0 darken( $button-color, 15% );
}
&[disabled],
&:disabled,
&.button-primary-disabled,
&.disabled {
color: hsl( hue( $button-color ), 10%, 80% ) !important;
background: darken( $button-color, 8% ) !important;
border-color: darken( $button-color, 15% ) !important;
text-shadow: none !important;
}
&.button-hero {
box-shadow: 0 2px 0 darken( $button-color, 15% ) !important;
&:active {
box-shadow: inset 0 3px 0 darken( $button-color, 15% ) !important;
}
}
}