sass conversion fixes for 0.5.4

This commit is contained in:
Kevin Ross 2015-12-08 15:48:04 -06:00
parent 41c37fe3d6
commit 709a4ffbf9
3 changed files with 10 additions and 11 deletions

View File

@ -151,9 +151,9 @@ module.exports = function (grunt) {
}, },
// button variations mixin replacement(s) // button variations mixin replacement(s)
{ // Multi-line replacement - https://regex101.com/r/qD9qB8/2 { // https://regex101.com/r/qD9qB8/4
pattern: /.generic-variations\(unquote\(("[^"]+")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+?(?!\r|\n)contrast[\s\S]+?(?!\r|\n)(\d+)[\s\S]+?(?!\r|\n)}\);$\n/mg, pattern: /.generic-variations\(unquote\(".btn", ~("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg,
replacement: "@include button-variations(unquote($1), $2, $3%);\n", replacement: "@include button-variations(unquote(\".btn\"), $1, $3);\n",
order: 20 order: 20
}, },
@ -207,9 +207,9 @@ module.exports = function (grunt) {
}, },
// alert generic-variations (convert this one last - very broad search) // alert generic-variations (convert this one last - very broad search)
{ // Multi-line replacement - https://regex101.com/r/jB1uL1/2 { // Multi-line replacement - https://regex101.com/r/jB1uL1/3
pattern: /.generic-variations\(unquote\(("([^"]+)?")\), unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg, pattern: /.generic-variations\(unquote\(".alert"\), unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg,
replacement: "@include alert-variations(unquote($1), unquote($3), $5);\n", replacement: "@include alert-variations(unquote(\".alert\"), unquote($1), $3);\n",
order: 250 // very broad search, do this last order: 250 // very broad search, do this last
}, },
@ -218,8 +218,7 @@ module.exports = function (grunt) {
pattern: /([\s\S]+)/mg, pattern: /([\s\S]+)/mg,
replacement: "\/\/ This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.\n\n$1", replacement: "\/\/ This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.\n\n$1",
order: 1000 // very broad search, do this last order: 1000 // very broad search, do this last
}, }
] ]
} }
} }

View File

@ -80,7 +80,7 @@
// FIXME: SPEC - this should be the 600 color, how can we get that programmatically if at all? Or are we limited to the color palette only? // FIXME: SPEC - this should be the 600 color, how can we get that programmatically if at all? Or are we limited to the color palette only?
// SASS conversion note: please mirror any content change in _mixins-shared.scss button-variations-content // SASS conversion note: please mirror any content change in _mixins-shared.scss button-variations-content
@include alert-variations(unquote(".btn"), unquote(""), $mdb-btn-background-color); @include button-variations(unquote(".btn"), "", $mdb-btn-background-color);
// Spec: // Spec:
// - Raised Light/Light theme no hover. // - Raised Light/Light theme no hover.

View File

@ -42,8 +42,8 @@
// color: map-get($args, variation-color); // color: map-get($args, variation-color);
//} //}
@mixin button-variations($component, $selector-suffix, $color-default, $mdb-param-1) { @mixin button-variations($component, $selector-suffix, $color-default) {
@include generic-variations($component, $selector-suffix, $color-default, "button-variations-content", $mdb-param-1); @include generic-variations($component, $selector-suffix, $color-default, "button-variations-content", 4%);
} }
@mixin button-variations-content($args) { @mixin button-variations-content($args) {