fixed shadow hovers

This commit is contained in:
Kevin Ross 2015-11-03 12:33:54 -06:00
parent 64e1fd6673
commit 95590f8b04
2 changed files with 9 additions and 7 deletions

View File

@ -17,12 +17,14 @@ module.exports = function(grunt) {
}], }],
options: { options: {
replacements: [ replacements: [
{ // bad conversions of shadow-z-* to @include instead of @extend // bad conversions of shadow-z-* to @include instead of @extend
pattern: /@include shadow-z-(\d+)\(\);/gi, { // https://regex101.com/r/bF2iJ2/1
replacement: '@extend .shadow-z-$1;', pattern: /@include shadow-z-(\d+)((?:-hover)?)\(\);/gi,
replacement: '@extend .shadow-z-$1$2;',
order: 2 order: 2
}, },
{ // bad conversions to @include instead of @extend // bad conversions to @include instead of @extend
{
pattern: /@include (foo1|foo2)\(\);/gi, pattern: /@include (foo1|foo2)\(\);/gi,
replacement: '@extend .$1;', replacement: '@extend .$1;',
order: 2 order: 2

View File

@ -13,7 +13,7 @@
@extend .shadow-z-1; @extend .shadow-z-1;
} }
&:active:not(.btn-link):not(.btn-flat):not(.btn-fab) { &:active:not(.btn-link):not(.btn-flat):not(.btn-fab) {
@include shadow-z-1-hover(); @extend .shadow-z-1-hover;
} }
transition: background-color 0.2s ease, box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); transition: background-color 0.2s ease, box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
outline: none !important; outline: none !important;
@ -70,7 +70,7 @@
@extend .shadow-z-1; @extend .shadow-z-1;
} }
&:active { &:active {
@include shadow-z-1-hover(); @extend .shadow-z-1-hover;
} }
&, .ripple-wrapper { &, .ripple-wrapper {
border-radius: 100%; border-radius: 100%;
@ -132,6 +132,6 @@
@extend .shadow-z-1; @extend .shadow-z-1;
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
&:active:not(.btn-link) { &:active:not(.btn-link) {
@include shadow-z-1-hover(); @extend .shadow-z-1-hover;
} }
} }