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,
|
"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,11 +36,25 @@ $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($semantics, $name) {
|
@if map-has-key($helpers, $name) {
|
||||||
@return map-get($palette, map-get($semantics, $name));
|
@return map-get($palette, map-get($helpers, $name));
|
||||||
} @else {
|
} @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