fix: split and fix toasts

This commit is contained in:
Kazhnuz Klappsthul 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/cards';
@import 'components/menus';
@import 'components/toasts';
@import 'components/tables';
@import 'components/previews';

View File

@ -75,39 +75,16 @@ ul.card-list, .card > ul {
&-success{@include list-color($color-success);}
}
.smallcard, .toast {
@include panel($card-smallpad);
.smallcard {
&-header {
@include panel-header($card-bigpad);
}
}
.toast {
padding:$card-smallpad,
}
/* COLORIZE CARDS and TOASTS */
.card, .smallcard, .menu {
.card, .smallcard {
@each $name, $color in list-colors() {
&-#{$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)); }
}
}