fix: split and fix toasts

This commit is contained in:
Kazhnuz 2021-07-30 12:19:48 +02:00
parent 93e24a1a8f
commit 9d2d8cfd81
3 changed files with 28 additions and 25 deletions

View file

@ -11,5 +11,6 @@
@import 'components/pagination'; @import 'components/pagination';
@import 'components/cards'; @import 'components/cards';
@import 'components/menus'; @import 'components/menus';
@import 'components/toasts';
@import 'components/tables'; @import 'components/tables';
@import 'components/previews'; @import 'components/previews';

View file

@ -75,39 +75,16 @@ ul.card-list, .card > ul {
&-success{@include list-color($color-success);} &-success{@include list-color($color-success);}
} }
.smallcard, .toast { .smallcard {
@include panel($card-smallpad);
&-header { &-header {
@include panel-header($card-bigpad); @include panel-header($card-bigpad);
} }
} }
.toast {
padding:$card-smallpad,
}
/* COLORIZE CARDS and TOASTS */ /* COLORIZE CARDS and TOASTS */
.card, .smallcard, .menu { .card, .smallcard {
@each $name, $color in list-colors() { @each $name, $color in list-colors() {
&-#{$name} { @include card-color(get-color($name)); } &-#{$name} { @include card-color(get-color($name)); }
} }
} }
.toast {
@each $name, $color in list-colors() {
&-#{$name} { @include background-color(get-color($name)); }
}
a, a:visited {
color: $color-font-light;
background-color:rgba(0,0,0,0.15);
text-decoration:none;
opacity:1;
&:hover, &:active, &:visited {
color: $color-font-light;
background-color:transparent;
opacity:1;
}
}
}

View file

@ -0,0 +1,25 @@
@mixin toast-color($background-color) {
@include background-color($background-color);
color: getTextColorFromBackground($background-color);
a, a:visited {
color: getTextColorFromBackground($background-color);
background-color: accentuate($background-color);
text-decoration:none;
opacity:1;
&:hover, &:active, &:visited {
color: getTextColorFromBackground($background-color);
background-color:transparent;
opacity:1;
}
}
}
.toast {
@include panel($card-smallpad);
padding:$card-smallpad;
@each $name, $color in list-colors() {
&-#{$name} { @include toast-color(get-color($name)); }
}
}