diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/_variables.scss index cd0ef8a5..88ffc36e 100644 --- a/app/assets/stylesheets/_variables.scss +++ b/app/assets/stylesheets/_variables.scss @@ -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; diff --git a/app/assets/stylesheets/overrides/_buttons.scss b/app/assets/stylesheets/overrides/_buttons.scss index 222b4112..9ee4ab69 100644 --- a/app/assets/stylesheets/overrides/_buttons.scss +++ b/app/assets/stylesheets/overrides/_buttons.scss @@ -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}); diff --git a/app/assets/stylesheets/overrides/_colors.scss b/app/assets/stylesheets/overrides/_colors.scss index 2b25c91e..e8491aa5 100644 --- a/app/assets/stylesheets/overrides/_colors.scss +++ b/app/assets/stylesheets/overrides/_colors.scss @@ -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; }