zahmis 5 лет назад
Родитель
Сommit
829f9d3337
1 измененных файлов с 21 добавлено и 5 удалено
  1. 21 5
      src/client/styles/scss/theme/_reboot-bootstrap-theme-colors.scss

+ 21 - 5
src/client/styles/scss/theme/_reboot-bootstrap-theme-colors.scss

@@ -1,20 +1,36 @@
 $theme-colors: map-merge($theme-colors, $colors);
 
-@mixin button-svg-icon-variant($color) {
+@mixin button-svg-icon-variant($background, $hover-background: darken($background, 7.5%), $active-background: darken($background, 10%)) {
   svg {
-    fill: $color;
+    fill: color-yiq($background);
   }
+
+  @include hover() {
+    svg {
+      fill: color-yiq($hover-background);
+    }
+  }
+
+  &:focus,
+  &.focus {
+    svg {
+      fill: color-yiq($hover-background);
+    }
+  }
+
+  // Disabled comes first so active can properly restyle
   &.disabled,
   &:disabled {
     svg {
-      fill: $color;
+      color: color-yiq($background);
     }
   }
+
   &:not(:disabled):not(.disabled):active,
   &:not(:disabled):not(.disabled).active,
   .show > &.dropdown-toggle {
     svg {
-      fill: $color;
+      color: color-yiq($active-background);
     }
   }
 }
@@ -60,7 +76,7 @@ $theme-colors: map-merge($theme-colors, $colors);
 @each $color, $value in $theme-colors {
   .btn-#{$color} {
     @include button-variant($value, $value);
-    @include button-svg-icon-variant($value);
+    @include button-svg-icon-variant($value, $value);
   }
 }