refactor(button): button[clear] :hover

Closes #145
This commit is contained in:
Adam Bradley
2015-09-21 22:09:43 -05:00
parent 938ac117a9
commit dd47e93b0b

View File

@ -2,10 +2,8 @@
// Clear Button
// --------------------------------------------------
button,
[button] {
&[clear] {
button[clear],
[button][clear] {
border-color: transparent;
background: transparent;
color: darken-or-lighten($button-color);
@ -13,36 +11,34 @@ button,
&.activated {
opacity: 0.4;
}
}
}
// Clear Button Color Mixin
// --------------------------------------------------
@mixin button-clear($fg-color) {
&[clear] {
border-color: transparent;
background: transparent;
color: $fg-color;
.enable-hover button[clear]:hover,
.enable-hover [button][clear]:hover {
opacity: 0.6;
color: darken-or-lighten($button-color);
}
}
// Generate Clear Button Colors
// --------------------------------------------------
@each $color, $value in auxiliary-colors() {
@each $color-name, $color-value in auxiliary-colors() {
button[#{$color}],
[button][#{$color}] {
$fg-color: darken-or-lighten($color-value);
$fg-color: darken-or-lighten($value);
@include button-clear($fg-color);
button[clear][#{$color-name}],
[button][clear][#{$color-name}] {
border-color: transparent;
background: transparent;
color: $fg-color;
}
.enable-hover button[clear][#{$color-name}]:hover,
.enable-hover [button][clear][#{$color-name}]:hover {
color: darken-or-lighten($fg-color);
}
}