fix: optimize palette

This commit is contained in:
Kazhnuz 2021-07-30 13:13:12 +02:00
parent 51f575413c
commit 8ee5ac198e

View file

@ -25,19 +25,9 @@ $palette: (
"yellow":#b58900, "yellow":#b58900,
"grey":#586e75, "grey":#586e75,
"dark2":#073642, "dark2":#073642,
"light2":#eee8d5, "light2":#eee8d5);
"gray2":#657b83,
"gray3":#839496,
"gray4":#93a1a1);
$semantics: ( $semantics: (
"font":"dark2",
"font-light":"light",
"background":"light",
"background-alt":"light2",
"link":"skyblue",
"selection":"skyblue",
"mark":"yellow",
"primary":"violet", "primary":"violet",
"secondary":"skyblue", "secondary":"skyblue",
"warning":"orange", "warning":"orange",
@ -46,12 +36,26 @@ $semantics: (
"success":"green", "success":"green",
"muted":"grey"); "muted":"grey");
$helpers: (
"font":"dark2",
"font-light":"light",
"background":"light",
"background-alt":"light2",
"link":"skyblue",
"selection":"skyblue",
"mark":"yellow",
);
@function get-color($name) { @function get-color($name) {
@if map-has-key($helpers, $name) {
@return map-get($palette, map-get($helpers, $name));
} @else {
@if map-has-key($semantics, $name) { @if map-has-key($semantics, $name) {
@return map-get($palette, map-get($semantics, $name)); @return map-get($palette, map-get($semantics, $name));
} @else { } @else {
@return map-get($palette, $name); @return map-get($palette, $name);
} }
}
} }
// **Couleurs du theme** // **Couleurs du theme**