fix: optimize palette
This commit is contained in:
parent
51f575413c
commit
8ee5ac198e
1 changed files with 18 additions and 14 deletions
|
@ -25,19 +25,9 @@ $palette: (
|
|||
"yellow":#b58900,
|
||||
"grey":#586e75,
|
||||
"dark2":#073642,
|
||||
"light2":#eee8d5,
|
||||
"gray2":#657b83,
|
||||
"gray3":#839496,
|
||||
"gray4":#93a1a1);
|
||||
"light2":#eee8d5);
|
||||
|
||||
$semantics: (
|
||||
"font":"dark2",
|
||||
"font-light":"light",
|
||||
"background":"light",
|
||||
"background-alt":"light2",
|
||||
"link":"skyblue",
|
||||
"selection":"skyblue",
|
||||
"mark":"yellow",
|
||||
"primary":"violet",
|
||||
"secondary":"skyblue",
|
||||
"warning":"orange",
|
||||
|
@ -46,11 +36,25 @@ $semantics: (
|
|||
"success":"green",
|
||||
"muted":"grey");
|
||||
|
||||
$helpers: (
|
||||
"font":"dark2",
|
||||
"font-light":"light",
|
||||
"background":"light",
|
||||
"background-alt":"light2",
|
||||
"link":"skyblue",
|
||||
"selection":"skyblue",
|
||||
"mark":"yellow",
|
||||
);
|
||||
|
||||
@function get-color($name) {
|
||||
@if map-has-key($semantics, $name) {
|
||||
@return map-get($palette, map-get($semantics, $name));
|
||||
@if map-has-key($helpers, $name) {
|
||||
@return map-get($palette, map-get($helpers, $name));
|
||||
} @else {
|
||||
@return map-get($palette, $name);
|
||||
@if map-has-key($semantics, $name) {
|
||||
@return map-get($palette, map-get($semantics, $name));
|
||||
} @else {
|
||||
@return map-get($palette, $name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue