Moved $colors list into variables

Also renamed it because it would cause a collission with Bootstraps $colors surely at some point.
This commit is contained in:
Andreas Nedbal 2020-04-28 13:07:16 +02:00
parent a7cefa11b3
commit aa453ab770
3 changed files with 12 additions and 19 deletions

View File

@ -1,4 +1,4 @@
// Colors
// Color overrides for Bootstrap
$primary: #5e35b1;
// Cards
@ -10,6 +10,15 @@ $list-group-border-width: 0;
// nProgress
$nprogress-color: lighten($navbar-inverse-bg, 25%);
// Color names for theme generation
$colorNames: (
"primary",
"danger",
"warning",
"info",
"success"
);
:root {
--background: #f0edf4;
--card-bg: #ffffff;

View File

@ -1,12 +1,4 @@
$colors: (
"primary",
"danger",
"warning",
"info",
"success"
);
@each $color in $colors {
@each $color in $colorNames {
.btn-#{$color} {
background-color: var(--#{$color});
border-color: var(--#{$color});

View File

@ -1,12 +1,4 @@
$colors: (
"primary",
"danger",
"warning",
"info",
"success"
);
@each $color in $colors {
@each $color in $colorNames {
.bg-#{$color} {
background-color: var(--#{$color}) !important;
}