From b8dbeed03ed3fdf6e9db377e557c4cf528bf910f Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 21 May 2023 16:13:26 +0200 Subject: [PATCH] fix: add missing changes Fixes #19 Fixes #18 --- scss/definitions/_palette.scss | 45 ++++++++++++++++++++++++++++------ scss/utils/_colorize.scss | 14 +++++++++++ 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/scss/definitions/_palette.scss b/scss/definitions/_palette.scss index be86901..43874a0 100644 --- a/scss/definitions/_palette.scss +++ b/scss/definitions/_palette.scss @@ -14,19 +14,32 @@ $whiteness_value: 0.8; // Couleurs de base du theme : $palette: ( - "blue":#339af0, - "violet":#845ef7, - "red":#e33d22, - "orange":#ff922b, - "green":#51cf66, - "skyblue":#3bc9db, + "blue":#1971c2, + "violet":#6741d9, + "red":#e03131, + "orange":#e8590c, + "green":#2f9e44, + "skyblue":#0c8599, "dark": #343a40, - "light":#fefefe, - "yellow":#fcc419, + "light":#ffffff, + "yellow":#ffe066, "grey":#adb5bd, "dark2":#212529, "light2":#f1f3f5); +$palette-light: ( + "blue": #a5d8ff, + "violet":#d0bfff, + "red":#ffc9c9, + "orange":#ffd8a8, + "green":#b2f2bb, + "skyblue":#99e9f2, + "yellow":#ffec99, + "light":#ffffff, + "grey":#f1f3f5, + "dark":#adb5bd +); + $semantics: ( "primary":"red", "secondary":"dark", @@ -60,6 +73,22 @@ $helpers: ( } } +@function get-color-light($name) { + @if map-has-key($helpers, $name) { + @return map-get($palette-light, map-get($helpers, $name)); + } + + @else { + @if map-has-key($semantics, $name) { + @return map-get($palette-light, map-get($semantics, $name)); + } + + @else { + @return map-get($palette-light, $name); + } + } +} + // **Couleurs du theme** // Ne pas retirer ces couleurs, qui // sont essentielle pour que le framework functionne. diff --git a/scss/utils/_colorize.scss b/scss/utils/_colorize.scss index c53c4ba..daa88dd 100644 --- a/scss/utils/_colorize.scss +++ b/scss/utils/_colorize.scss @@ -38,6 +38,20 @@ } } +.bg-soft { + + @each $name, + $color in list-colors() { + &-#{$name} { + @include bg-color(get-color-light($name)); + + &:hover { + @include bg-color(get-color-light($name)); + } + } + } +} + .text { @each $name,