mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
altered conversion of shadows as mixins (incorrectly saw them as @extends)
This commit is contained in:
parent
d607559f26
commit
b21fad8b87
14
Gruntfile.js
14
Gruntfile.js
|
@ -17,16 +17,18 @@ module.exports = function (grunt) {
|
|||
}],
|
||||
options: {
|
||||
replacements: [
|
||||
// bad conversions of shadow-z-* to @include instead of @extend
|
||||
{ // https://regex101.com/r/bF2iJ2/1
|
||||
pattern: /@include shadow-z-(\d+)((?:-hover)?)\(\);/gi,
|
||||
replacement: '@extend .shadow-z-$1$2;',
|
||||
|
||||
|
||||
// convert all shadow mixins
|
||||
{ // https://regex101.com/r/sJ2lH4/1
|
||||
pattern: /.shadow-z-(\d+)((?:-hover)?) {/gi,
|
||||
replacement: '@mixin shadow-z-$1$2 {',
|
||||
order: 2
|
||||
},
|
||||
// bad conversions of .shadow-z-*
|
||||
{ // https://regex101.com/r/pV0yB0/2
|
||||
{ // https://regex101.com/r/pV0yB0/3
|
||||
pattern: /\.shadow-z-(\d+)((?:-hover)?)(?:\(\))?;/gi,
|
||||
replacement: '@extend .shadow-z-$1$2;',
|
||||
replacement: '@include shadow-z-$1$2;',
|
||||
order: 2
|
||||
},
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@mixin btn-shadow(){
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1();
|
||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
&:active:not(.btn-link) {
|
||||
@extend .shadow-z-1-hover;
|
||||
@include shadow-z-1-hover();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
|||
color: $darkbg-text;
|
||||
|
||||
&:hover:not(.btn-link):not(.btn-flat):not(.btn-fab) {
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1();
|
||||
}
|
||||
&:active:not(.btn-link):not(.btn-flat):not(.btn-fab) {
|
||||
@extend .shadow-z-1-hover;
|
||||
@include shadow-z-1-hover();
|
||||
}
|
||||
transition: background-color 0.2s ease, box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
outline: none !important;
|
||||
|
@ -75,10 +75,10 @@
|
|||
@include variations(unquote(""), background-color, transparent);
|
||||
}
|
||||
&, &:hover {
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1();
|
||||
}
|
||||
&:active {
|
||||
@extend .shadow-z-1-hover;
|
||||
@include shadow-z-1-hover();
|
||||
}
|
||||
&, .ripple-wrapper {
|
||||
border-radius: 100%;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
color: $card-body-text;
|
||||
background: $card-body-background;
|
||||
|
||||
@extend .shadow-z-2;
|
||||
@include shadow-z-2();
|
||||
|
||||
.card-image {
|
||||
height: 60%;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Material Design element Dialogs
|
||||
// --------------------------------------------------
|
||||
.modal-content {
|
||||
@extend .shadow-z-5;
|
||||
@include shadow-z-5();
|
||||
border-radius: 2px;
|
||||
border: none;
|
||||
// Modal header
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
border: 0;
|
||||
|
||||
@include variations(unquote(" > .panel-heading"), background-color, $grey-200);
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
color: $darkbg-text;
|
||||
font-size: 14px;
|
||||
border-radius: 2px;
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1;
|
||||
|
||||
// Animation
|
||||
height: 0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
background: $popover-background;
|
||||
border: none;
|
||||
border-radius: $material-border-radius;
|
||||
@extend .shadow-z-1;
|
||||
@include shadow-z-1();
|
||||
}
|
||||
|
||||
.tooltip, .tooltip.in {
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
.shadow-z-1 {
|
||||
@mixin shadow-z-1 {
|
||||
box-shadow:
|
||||
0 1px 6px 0 rgba(0, 0, 0, 0.12),
|
||||
0 1px 6px 0 rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.shadow-z-1-hover {
|
||||
@mixin shadow-z-1-hover {
|
||||
box-shadow:
|
||||
0 5px 11px 0 rgba(0, 0, 0, 0.18),
|
||||
0 4px 15px 0 rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.shadow-z-2 {
|
||||
@mixin shadow-z-2 {
|
||||
box-shadow:
|
||||
0 8px 17px 0 rgba(0, 0, 0, 0.2),
|
||||
0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
.shadow-z-3 {
|
||||
@mixin shadow-z-3 {
|
||||
box-shadow:
|
||||
0 12px 15px 0 rgba(0, 0, 0, 0.24),
|
||||
0 17px 50px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
.shadow-z-4 {
|
||||
@mixin shadow-z-4 {
|
||||
box-shadow:
|
||||
0 16px 28px 0 rgba(0, 0, 0, 0.22),
|
||||
0 25px 55px 0 rgba(0, 0, 0, 0.21);
|
||||
}
|
||||
|
||||
.shadow-z-5 {
|
||||
@mixin shadow-z-5 {
|
||||
box-shadow:
|
||||
0 27px 24px 0 rgba(0, 0, 0, 0.2),
|
||||
0 40px 77px 0 rgba(0, 0, 0, 0.22);
|
||||
|
|
|
@ -11,7 +11,7 @@ body, .container, .container-fluid {
|
|||
background-color: #fff;
|
||||
padding: 19px;
|
||||
margin-bottom: 20px;
|
||||
@extend .shadow-z-2;
|
||||
@include shadow-z-2();
|
||||
border-radius: 2px;
|
||||
border: 0;
|
||||
p {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
@import '_variables';
|
||||
@import '_mixins';
|
||||
@import '_icons-material-design';
|
||||
@import '_shadows'; // these are mixins only, and must be placed at the top before use (sass requiremnt)
|
||||
|
||||
body {
|
||||
background-color: $body-bg;
|
||||
|
@ -136,7 +137,3 @@ legend {
|
|||
@import '_plugin-nouislider';
|
||||
@import '_plugin-selectize';
|
||||
@import '_plugin-dropdownjs';
|
||||
|
||||
// Material shadows
|
||||
// Place them on bottom of stylesheet to increase the importance of it and override other same-specificity selectors
|
||||
@import '_shadows';
|
||||
|
|
Loading…
Reference in New Issue
Block a user