-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mixins.scss
executable file
·56 lines (52 loc) · 1.4 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
/*
* 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: $button-color;
box-shadow: none;
color: $text-color;
text-shadow: 0 -1px 1px darken( $button-color, 10% ), 1px 0 1px darken( $button-color, 10% ), 0 1px 1px darken( $button-color, 10% ), -1px 0 1px darken( $button-color, 10% );
&:active,
&:hover,
&:focus {
background: darken( $button-color, 5% );
border-color: darken( $button-color, 10% );
box-shadow: 0 0 1px 1px #b4b9be;
color: $text-color;
-webkit-transform: none;
-ms-transform: none;
transform: none;
}
&:active {
background: darken( $button-color, 10% );
border-color: 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;
}
}