mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Improve uses of default-themed variables
This commit is contained in:
parent
cb4afed825
commit
98f8ab7344
3 changed files with 5 additions and 4 deletions
|
@ -132,7 +132,7 @@ $btn-base-color-night: fusion-vars.$button-border;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$focus-color: color(shadow-focus, default);
|
$focus-color: color(shadow-focus);
|
||||||
|
|
||||||
@function down-arrow($color) {
|
@function down-arrow($color) {
|
||||||
@return url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='transparent' stroke='#{$color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
|
@return url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='transparent' stroke='#{$color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
@return $map;
|
@return $map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@function get-var-from-map($map, $keyword, $theme: default, $keys: ()) {
|
@function get-var-from-map($map, $keyword, $theme, $keys: ()) {
|
||||||
$i: str-index($keyword, "-");
|
$i: str-index($keyword, "-");
|
||||||
|
|
||||||
@if $i {
|
@if $i {
|
||||||
|
|
|
@ -51,6 +51,7 @@ $vars: (
|
||||||
),
|
),
|
||||||
button: (
|
button: (
|
||||||
focus: (
|
focus: (
|
||||||
|
default: palette(cyan, 3),
|
||||||
light: palette(cyan, 2),
|
light: palette(cyan, 2),
|
||||||
dark: palette(cyan, 4),
|
dark: palette(cyan, 4),
|
||||||
),
|
),
|
||||||
|
@ -173,12 +174,12 @@ $vars: (
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@function color($keyword, $theme) {
|
@function color($keyword, $theme: default) {
|
||||||
$colors: map.get($vars, colors);
|
$colors: map.get($vars, colors);
|
||||||
@return get-var-from-map($colors, $keyword, $theme);
|
@return get-var-from-map($colors, $keyword, $theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
@function prop($keyword, $theme) {
|
@function prop($keyword, $theme: default) {
|
||||||
$props: map.get($vars, props);
|
$props: map.get($vars, props);
|
||||||
@return get-var-from-map($props, $keyword, $theme);
|
@return get-var-from-map($props, $keyword, $theme);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue