mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-25 11:04:09 +03:00
converted alert-variations
This commit is contained in:
parent
ca93368247
commit
97df691b09
|
@ -64,6 +64,13 @@ module.exports = function (grunt) {
|
||||||
replacement: '@include navbar-variations(unquote($1), $2);\n',
|
replacement: '@include navbar-variations(unquote($1), $2);\n',
|
||||||
order: 24
|
order: 24
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// alert generic-variations (convert this one last - very broad search)
|
||||||
|
{ // Multi-line replacement - https://regex101.com/r/jB1uL1/1
|
||||||
|
pattern: /.generic-variations\(unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg,
|
||||||
|
replacement: '@include alert-variations(unquote($1), $3);\n',
|
||||||
|
order: 250 // very broad search, do this last
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,7 @@
|
||||||
border: 0px;
|
border: 0px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
||||||
.generic-variations(unquote(""), $darkbg-text, {
|
@include alert-variations(unquote(""), $darkbg-text);
|
||||||
background-color: $material-color;
|
|
||||||
color: $material-text-color;
|
|
||||||
|
|
||||||
a, .alert-link {
|
|
||||||
color: $material-text-color;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
&-info, &-danger, &-warning, &-success {
|
&-info, &-danger, &-warning, &-success {
|
||||||
color: $darkbg-text;
|
color: $darkbg-text;
|
||||||
|
|
|
@ -113,6 +113,23 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// alert-variations("", $primary)
|
||||||
|
@mixin alert-variations($extra, $default) {
|
||||||
|
@include generic-variations($extra, $default, "alert-variations-content", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin alert-variations-content($args){
|
||||||
|
$material-color: map-get($args, material-color);
|
||||||
|
$material-text-color: map-get($args, material-text-color);
|
||||||
|
|
||||||
|
background-color: $material-color;
|
||||||
|
color: $material-text-color;
|
||||||
|
|
||||||
|
a, .alert-link {
|
||||||
|
color: $material-text-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// interpolation of mixin-name is not allowed evidently, so we statically include based on the mixin-name given
|
// interpolation of mixin-name is not allowed evidently, so we statically include based on the mixin-name given
|
||||||
@mixin call-variations-content-mixin($args) {
|
@mixin call-variations-content-mixin($args) {
|
||||||
$mixin-name: map-get($args, mixin-name);
|
$mixin-name: map-get($args, mixin-name);
|
||||||
|
@ -132,6 +149,8 @@
|
||||||
@include bg-img-variations-content($args);
|
@include bg-img-variations-content($args);
|
||||||
} @else if $mixin-name == navbar-variations-content {
|
} @else if $mixin-name == navbar-variations-content {
|
||||||
@include navbar-variations-content($args);
|
@include navbar-variations-content($args);
|
||||||
|
}@else if $mixin-name == alert-variations-content {
|
||||||
|
@include alert-variations-content($args);
|
||||||
} @else {
|
} @else {
|
||||||
@error "Unknown mixin: #{$mixin-name}"
|
@error "Unknown mixin: #{$mixin-name}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user