Skip to content

Commit fdbe64b

Browse files
refactor(toasts): use new mixin toast-class-variant() and the old one toast-variant() to have backward compatibility.
1 parent 87ebe64 commit fdbe64b

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/_toasts.scss

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
// Toasts
77
.toast {
88
// @include toast-variant($dark-color); // old spectre.css
9-
// @include toast-variant('dark-color'); // old @angular-package/spectre.css
10-
background: color('dark-color', $alpha: 0.95);
11-
border-color: color('dark-color');
9+
@include toast-variant($color: 'dark-color');
10+
1211
// border: $border-width solid $dark-color; // old spectre.css
1312
border: get-var('border-width') solid color('dark-color');
1413
// border-radius: $border-radius; // old spectre.css
@@ -21,18 +20,18 @@
2120
width: 100%;
2221

2322
// Variants.
24-
@include toast-variant($name: 'accent', $color: 'accent-color'); // ! New toast variant.
25-
@include toast-variant($name: 'disabled', $color: 'disabled-color'); // ! New toast variant.
26-
@include toast-variant($name: 'error', $color: 'error-color');
27-
@include toast-variant($name: 'gray', $color: 'gray-color'); // ! New toast variant.
28-
@include toast-variant($name: 'gray-dark', $color: 'gray-color-dark'); // ! New toast variant.
29-
@include toast-variant($name: 'gray-light', $color: 'gray-color-light'); // ! New toast variant.
30-
@include toast-variant($name: 'info', $color: 'info-color'); // ! New toast variant.
31-
@include toast-variant($name: 'light', $color: 'light-color'); // ! New toast variant.
32-
@include toast-variant($name: 'primary', $color: 'primary-color');
33-
@include toast-variant($name: 'secondary', $color: 'secondary-color'); // ! New toast variant.
34-
@include toast-variant($name: 'success', $color: 'success-color');
35-
@include toast-variant($name: 'warning', $color: 'warning-color');
23+
@include toast-class-variant($name: 'accent', $color: 'accent-color'); // ! New toast variant.
24+
@include toast-class-variant($name: 'disabled', $color: 'disabled-color'); // ! New toast variant.
25+
@include toast-class-variant($name: 'error', $color: 'error-color');
26+
@include toast-class-variant($name: 'gray', $color: 'gray-color'); // ! New toast variant.
27+
@include toast-class-variant($name: 'gray-dark', $color: 'gray-color-dark'); // ! New toast variant.
28+
@include toast-class-variant($name: 'gray-light', $color: 'gray-color-light'); // ! New toast variant.
29+
@include toast-class-variant($name: 'info', $color: 'info-color'); // ! New toast variant.
30+
@include toast-class-variant($name: 'light', $color: 'light-color'); // ! New toast variant.
31+
@include toast-class-variant($name: 'primary', $color: 'primary-color');
32+
@include toast-class-variant($name: 'secondary', $color: 'secondary-color'); // ! New toast variant.
33+
@include toast-class-variant($name: 'success', $color: 'success-color');
34+
@include toast-class-variant($name: 'warning', $color: 'warning-color');
3635

3736
&.toast-disabled {
3837
color: color('disabled-color', $lightness: -10%);

0 commit comments

Comments
 (0)