Skip to content

Commit ac29c79

Browse files
committed
feat: add more colors to toasts
1 parent e8d78f6 commit ac29c79

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

scss/_mixins.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
@import "mixins/sidebar-width"; // TODO: refactor
3838
@import "mixins/switches";
3939
@import "mixins/table-row";
40+
@import "mixins/toasts";
4041
@import "mixins/icon";
4142

4243
// Skins

scss/_toasts.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,14 @@
121121
margin-bottom: ($spacer / 8);
122122
}
123123
}
124+
125+
// Alternate styles
126+
//
127+
// Generate contextual modifier classes for colorizing the toast.
128+
129+
@include theme-variant() {
130+
.toast-#{$color} {
131+
@include toast-variant($value);
132+
}
133+
}
134+

scss/mixins/_toasts.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@mixin toast-variant($background) {
2+
color: color-yiq($background);
3+
background-color: $background;
4+
border-color: darken($background, 10%);
5+
6+
.toast-header {
7+
color: color-yiq($background);
8+
background-color: darken($background, 5%);
9+
border-color: darken($background, 10%);
10+
}
11+
}

0 commit comments

Comments
 (0)