diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-08-10 21:17:12 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-08-17 17:54:03 +0300 |
commit | 1f4eaa1695bde5891a786784a8845b54ad18e1f9 (patch) | |
tree | 55ec0e05250824df30674382207e39e8bfd90acc /src/assets/styles/bmc/helpers | |
parent | f0a1ac7eb7cf724d412acd2c0c9a3bf3d1fcc204 (diff) | |
download | webui-vue-1f4eaa1695bde5891a786784a8845b54ad18e1f9.tar.xz |
Update use of Sass variable background variant colors
The hardcoded Sass variable assignments to lighter variant background colors
does not work well with the theme-color functions that are used.
Use Bootstrap's built in theme-color-level function to programatically get
a lighter variant color to use for component backgrounds.
https://getbootstrap.com/docs/4.5/getting-started/theming/#functions
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I9d5a1a66c92d347ba1797be5e0810a24c34094f9
Diffstat (limited to 'src/assets/styles/bmc/helpers')
-rw-r--r-- | src/assets/styles/bmc/helpers/_colors.scss | 18 | ||||
-rw-r--r-- | src/assets/styles/bmc/helpers/_functions.scss | 5 | ||||
-rw-r--r-- | src/assets/styles/bmc/helpers/_index.scss | 3 |
3 files changed, 8 insertions, 18 deletions
diff --git a/src/assets/styles/bmc/helpers/_colors.scss b/src/assets/styles/bmc/helpers/_colors.scss index 6e090fbc..f300d5c3 100644 --- a/src/assets/styles/bmc/helpers/_colors.scss +++ b/src/assets/styles/bmc/helpers/_colors.scss @@ -2,16 +2,9 @@ $black: #000; $white: #fff; -$blue-100: #eff2fb; $blue-500: #2d60e5; - -$green-100: #ecfdf1; $green-500: #0a7d06; - -$red-100: #feeeed; $red-500: #da1416; - -$yellow-100: #fff8e4; $yellow-500: #efc100; $gray-100: #f4f4f4; @@ -39,13 +32,4 @@ $light: $gray-100; $primary: $blue; $secondary: $gray-800; $success: $green; -$warning: $yellow; - -// Sass Color Variable Accents -// Used for component styles and are -// not available as variants -$danger-light: $red-100; -$info-light: $blue-100; -$warning-light: $yellow-100; -$success-light: $green-100; - +$warning: $yellow;
\ No newline at end of file diff --git a/src/assets/styles/bmc/helpers/_functions.scss b/src/assets/styles/bmc/helpers/_functions.scss new file mode 100644 index 00000000..456caf36 --- /dev/null +++ b/src/assets/styles/bmc/helpers/_functions.scss @@ -0,0 +1,5 @@ +// This function is usually used to get a lighter +// theme variant color to use as a background color +@function theme-color-light($variant) { + @return theme-color-level($variant, -11.3); +}
\ No newline at end of file diff --git a/src/assets/styles/bmc/helpers/_index.scss b/src/assets/styles/bmc/helpers/_index.scss index e4abf9c5..ce0631a7 100644 --- a/src/assets/styles/bmc/helpers/_index.scss +++ b/src/assets/styles/bmc/helpers/_index.scss @@ -1,3 +1,4 @@ @import "./colors"; @import "./motion"; -@import "./variables";
\ No newline at end of file +@import "./variables"; +@import "./functions";
\ No newline at end of file |