c8213c18c6b37cfe973ddc73a386408d0bbe360c
[autoinstalls/wordpress.git] / wp-admin / css / colors / _mixins.scss
1 /*
2  * Button mixin- creates 3d-ish button effect with correct
3  * highlights/shadows, based on a base color.
4  */
5 @mixin button( $button-color, $text-color: white ) {
6         background: $button-color;
7         border-color: darken( $button-color, 10% ) darken( $button-color, 15% ) darken( $button-color, 15% );
8         color: $text-color;
9         box-shadow: 0 1px 0 darken( $button-color, 15% );
10         text-shadow: 0 -1px 1px darken( $button-color, 15% ),
11                 1px 0 1px darken( $button-color, 15% ),
12                 0 1px 1px darken( $button-color, 15% ),
13                 -1px 0 1px darken( $button-color, 15% );
14
15         &:hover,
16         &:focus {
17                 background: lighten( $button-color, 3% );
18                 border-color: darken( $button-color, 15% );
19                 color: $text-color;
20                 box-shadow: 0 1px 0 darken( $button-color, 15% );
21         }
22
23         &:focus {
24                 box-shadow: inset 0 1px 0 darken( $button-color, 10% ),
25                                         0 0 2px 1px #33b3db;
26         }
27
28         &:active {
29                 background: darken( $button-color, 10% );
30                 border-color: darken( $button-color, 15% );
31                 box-shadow: inset 0 2px 0 darken( $button-color, 15% );
32         }
33
34         &[disabled],
35         &:disabled,
36         &.button-primary-disabled,
37         &.disabled {
38                 color: hsl( hue( $button-color ), 10%, 80% ) !important;
39                 background: darken( $button-color, 8% ) !important;
40                 border-color: darken( $button-color, 15% ) !important;
41                 text-shadow: none !important;
42         }
43
44         &.button-hero {
45                 box-shadow: 0 2px 0 darken( $button-color, 15% ) !important;
46                 &:active {
47                         box-shadow: inset 0 3px 0 darken( $button-color, 15% ) !important;
48                 }
49         }
50
51 }