From d74870a749d694cb2859d300c24a0a49a0b52bce Mon Sep 17 00:00:00 2001 From: maks Date: Thu, 23 Dec 2021 13:58:25 +0100 Subject: move theme-colors (vars+map) after color tints definitions In this way we can use color tints other than grays in our custom theme, w/o having to extend it later (e.g `$primary: $indigo-600;` ). This could be done in the project variables file, but i believe most developers just include a full local copy of `scss/_variables.scss` before the the original `default` file and change the values the need (maybe also removing the !default flag) so that it's easier to track changes and custom values during upgrades. --- scss/_variables.scss | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'scss') diff --git a/scss/_variables.scss b/scss/_variables.scss index 5dd78ae2a8..ccc925837a 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -66,30 +66,6 @@ $colors: ( ) !default; // scss-docs-end colors-map -// scss-docs-start theme-color-variables -$primary: $blue !default; -$secondary: $gray-600 !default; -$success: $green !default; -$info: $cyan !default; -$warning: $yellow !default; -$danger: $red !default; -$light: $gray-100 !default; -$dark: $gray-900 !default; -// scss-docs-end theme-color-variables - -// scss-docs-start theme-colors-map -$theme-colors: ( - "primary": $primary, - "secondary": $secondary, - "success": $success, - "info": $info, - "warning": $warning, - "danger": $danger, - "light": $light, - "dark": $dark -) !default; -// scss-docs-end theme-colors-map - // The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7. // See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast $min-contrast-ratio: 4.5 !default; @@ -320,6 +296,30 @@ $cyans: ( ) !default; // fusv-enable +// scss-docs-start theme-color-variables +$primary: $blue !default; +$secondary: $gray-600 !default; +$success: $green !default; +$info: $cyan !default; +$warning: $yellow !default; +$danger: $red !default; +$light: $gray-100 !default; +$dark: $gray-900 !default; +// scss-docs-end theme-color-variables + +// scss-docs-start theme-colors-map +$theme-colors: ( + "primary": $primary, + "secondary": $secondary, + "success": $success, + "info": $info, + "warning": $warning, + "danger": $danger, + "light": $light, + "dark": $dark +) !default; +// scss-docs-end theme-colors-map + // Characters which are escaped by the escape-svg function $escaped-characters: ( ("<", "%3c"), -- cgit v1.2.3