mirror of
https://github.com/ankitects/anki.git
synced 2025-11-14 08:37:11 -05:00
Add comments to variables
This commit is contained in:
parent
2f2f00adc0
commit
17e9e707af
15 changed files with 354 additions and 177 deletions
|
|
@ -63,7 +63,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.filtered {
|
.filtered {
|
||||||
color: color(accent-link) !important;
|
color: color(fg-link) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gears {
|
.gears {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--accent-link);
|
color: var(--fg-link);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ class FilteredDeckConfigDialog(QDialog):
|
||||||
qconnect(self.form.search_button.clicked, self.on_search_button)
|
qconnect(self.form.search_button.clicked, self.on_search_button)
|
||||||
qconnect(self.form.search_button_2.clicked, self.on_search_button_2)
|
qconnect(self.form.search_button_2.clicked, self.on_search_button_2)
|
||||||
qconnect(self.form.hint_button.clicked, self.on_hint_button)
|
qconnect(self.form.hint_button.clicked, self.on_hint_button)
|
||||||
blue = theme_manager.var(colors.ACCENT_LINK)
|
blue = theme_manager.var(colors.FG_LINK)
|
||||||
grey = theme_manager.var(colors.FG_DISABLED)
|
grey = theme_manager.var(colors.FG_DISABLED)
|
||||||
self.setStyleSheet(
|
self.setStyleSheet(
|
||||||
f"""QPushButton[label] {{ padding: 0; border: 0 }}
|
f"""QPushButton[label] {{ padding: 0; border: 0 }}
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,12 @@ QComboBox:!editable:hover {{
|
||||||
}}
|
}}
|
||||||
QPushButton:pressed,
|
QPushButton:pressed,
|
||||||
QComboBox:!editable:pressed {{
|
QComboBox:!editable:pressed {{
|
||||||
border: 1px solid {tm.var(colors.BUTTON_PRESSED_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_STRONG)};
|
||||||
background: {
|
background: {
|
||||||
button_pressed_gradient(
|
button_pressed_gradient(
|
||||||
tm.var(colors.BUTTON_GRADIENT_START),
|
tm.var(colors.BUTTON_GRADIENT_START),
|
||||||
tm.var(colors.BUTTON_GRADIENT_END),
|
tm.var(colors.BUTTON_GRADIENT_END),
|
||||||
tm.var(colors.BUTTON_PRESSED_SHADOW)
|
tm.var(colors.SHADOW)
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
|
@ -148,7 +148,7 @@ QComboBox::drop-down {{
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
subcontrol-position: top right;
|
subcontrol-position: top right;
|
||||||
border: 1px solid {tm.var(colors.BUTTON_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_SUBTLE)};
|
||||||
border-top-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
|
border-top-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
|
||||||
border-bottom-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
|
border-bottom-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
|
||||||
}}
|
}}
|
||||||
|
|
@ -226,8 +226,8 @@ def table_styles(tm: ThemeManager) -> str:
|
||||||
QTableView {{
|
QTableView {{
|
||||||
border-radius: {tm.var(props.BORDER_RADIUS)};
|
border-radius: {tm.var(props.BORDER_RADIUS)};
|
||||||
gridline-color: {tm.var(colors.BORDER)};
|
gridline-color: {tm.var(colors.BORDER)};
|
||||||
selection-background-color: {tm.var(colors.SELECTION_BG)};
|
selection-background-color: {tm.var(colors.SELECTED_BG)};
|
||||||
selection-color: {tm.var(colors.SELECTION_FG)};
|
selection-color: {tm.var(colors.SELECTED_FG)};
|
||||||
}}
|
}}
|
||||||
QHeaderView {{
|
QHeaderView {{
|
||||||
background: {tm.var(colors.CANVAS)};
|
background: {tm.var(colors.CANVAS)};
|
||||||
|
|
@ -243,12 +243,12 @@ QHeaderView::section {{
|
||||||
}}
|
}}
|
||||||
QHeaderView::section:pressed,
|
QHeaderView::section:pressed,
|
||||||
QHeaderView::section:pressed:!first {{
|
QHeaderView::section:pressed:!first {{
|
||||||
border: 1px solid {tm.var(colors.BUTTON_PRESSED_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_STRONG)};
|
||||||
background: {
|
background: {
|
||||||
button_pressed_gradient(
|
button_pressed_gradient(
|
||||||
tm.var(colors.BUTTON_GRADIENT_START),
|
tm.var(colors.BUTTON_GRADIENT_START),
|
||||||
tm.var(colors.BUTTON_GRADIENT_END),
|
tm.var(colors.BUTTON_GRADIENT_END),
|
||||||
tm.var(colors.BUTTON_PRESSED_SHADOW)
|
tm.var(colors.SHADOW)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
@ -297,7 +297,7 @@ QSpinBox::up-button,
|
||||||
QSpinBox::down-button {{
|
QSpinBox::down-button {{
|
||||||
subcontrol-origin: border;
|
subcontrol-origin: border;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
border: 1px solid {tm.var(colors.BUTTON_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_SUBTLE)};
|
||||||
background: {
|
background: {
|
||||||
button_gradient(
|
button_gradient(
|
||||||
tm.var(colors.BUTTON_GRADIENT_START),
|
tm.var(colors.BUTTON_GRADIENT_START),
|
||||||
|
|
@ -307,12 +307,12 @@ QSpinBox::down-button {{
|
||||||
}}
|
}}
|
||||||
QSpinBox::up-button:pressed,
|
QSpinBox::up-button:pressed,
|
||||||
QSpinBox::down-button:pressed {{
|
QSpinBox::down-button:pressed {{
|
||||||
border: 1px solid {tm.var(colors.BUTTON_PRESSED_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_STRONG)};
|
||||||
background: {
|
background: {
|
||||||
button_pressed_gradient(
|
button_pressed_gradient(
|
||||||
tm.var(colors.BUTTON_GRADIENT_START),
|
tm.var(colors.BUTTON_GRADIENT_START),
|
||||||
tm.var(colors.BUTTON_GRADIENT_END),
|
tm.var(colors.BUTTON_GRADIENT_END),
|
||||||
tm.var(colors.BUTTON_PRESSED_SHADOW)
|
tm.var(colors.SHADOW)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
@ -375,7 +375,7 @@ QRadioButton {{
|
||||||
}}
|
}}
|
||||||
QCheckBox::indicator,
|
QCheckBox::indicator,
|
||||||
QRadioButton::indicator {{
|
QRadioButton::indicator {{
|
||||||
border: 1px solid {tm.var(colors.BUTTON_BORDER)};
|
border: 1px solid {tm.var(colors.BORDER_SUBTLE)};
|
||||||
background: {tm.var(colors.CANVAS_INSET)};
|
background: {tm.var(colors.CANVAS_INSET)};
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ class ThemeManager:
|
||||||
disabled_color,
|
disabled_color,
|
||||||
)
|
)
|
||||||
|
|
||||||
palette.setColor(QPalette.ColorRole.Link, self.qcolor(colors.ACCENT_LINK))
|
palette.setColor(QPalette.ColorRole.Link, self.qcolor(colors.FG_LINK))
|
||||||
|
|
||||||
palette.setColor(QPalette.ColorRole.BrightText, Qt.GlobalColor.red)
|
palette.setColor(QPalette.ColorRole.BrightText, Qt.GlobalColor.red)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,6 @@ root_vars_css = sys.argv[1]
|
||||||
colors_py = sys.argv[2]
|
colors_py = sys.argv[2]
|
||||||
props_py = sys.argv[3]
|
props_py = sys.argv[3]
|
||||||
|
|
||||||
class Var(str):
|
|
||||||
def __new__(self, value: str, comment: str):
|
|
||||||
self.comment = comment
|
|
||||||
return str.__new__(self, value)
|
|
||||||
|
|
||||||
def comment(self):
|
|
||||||
return self.comment
|
|
||||||
|
|
||||||
colors = {}
|
colors = {}
|
||||||
props = {}
|
props = {}
|
||||||
reached_props = False
|
reached_props = False
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@if $border {
|
@if $border {
|
||||||
border: 1px solid var(--button-border);
|
border: 1px solid var(--border-subtle);
|
||||||
} @else {
|
} @else {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
@ -77,12 +77,12 @@
|
||||||
@if ($with-active) {
|
@if ($with-active) {
|
||||||
&:active {
|
&:active {
|
||||||
@include impressed-shadow(0.35);
|
@include impressed-shadow(0.35);
|
||||||
border-color: var(--button-border);
|
border-color: var(--border-subtle);
|
||||||
}
|
}
|
||||||
@if ($active-class != "") {
|
@if ($active-class != "") {
|
||||||
&.#{$active-class} {
|
&.#{$active-class} {
|
||||||
@include impressed-shadow(0.35);
|
@include impressed-shadow(0.35);
|
||||||
border-color: var(--button-border);
|
border-color: var(--border-subtle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,17 @@
|
||||||
|
|
||||||
@function create-vars-from-map($map, $theme, $name: "-", $output: ()) {
|
@function create-vars-from-map($map, $theme, $name: "-", $output: ()) {
|
||||||
@each $key, $value in $map {
|
@each $key, $value in $map {
|
||||||
@if $key == $theme {
|
@if $key ==
|
||||||
|
$theme or
|
||||||
|
(
|
||||||
|
$key ==
|
||||||
|
"default" and
|
||||||
|
type-of($value) !=
|
||||||
|
"map" and
|
||||||
|
type-of($value) !=
|
||||||
|
"list"
|
||||||
|
)
|
||||||
|
{
|
||||||
@return map.set($output, $name, map.get($map, $key));
|
@return map.set($output, $name, map.get($map, $key));
|
||||||
}
|
}
|
||||||
@if type-of($value) == "map" {
|
@if type-of($value) == "map" {
|
||||||
|
|
@ -21,8 +31,24 @@
|
||||||
create-vars-from-map($value, $theme, #{$name}-#{$key}, $output)
|
create-vars-from-map($value, $theme, #{$name}-#{$key}, $output)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} @else if $key == "default" {
|
} @else if type-of($value) == "list" and list.length($value) > 1 {
|
||||||
@return map.set($output, $name, map.get($map, $key));
|
$next-name: #{$name}-#{$key};
|
||||||
|
@if $key == "default" {
|
||||||
|
$next-name: $name;
|
||||||
|
}
|
||||||
|
$output: map-merge(
|
||||||
|
$output,
|
||||||
|
(#{"comment"}#{$next-name}: list.nth($value, 1))
|
||||||
|
);
|
||||||
|
$output: map-merge(
|
||||||
|
$output,
|
||||||
|
create-vars-from-map(
|
||||||
|
list.nth($value, 2),
|
||||||
|
$theme,
|
||||||
|
#{$next-name},
|
||||||
|
$output
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@return $output;
|
@return $output;
|
||||||
|
|
@ -30,7 +56,11 @@
|
||||||
|
|
||||||
@function map-deep-get($map, $keys) {
|
@function map-deep-get($map, $keys) {
|
||||||
@each $key in $keys {
|
@each $key in $keys {
|
||||||
$map: map-get($map, $key);
|
@if type-of($map) == "list" and list.length($map) > 1 {
|
||||||
|
$map: map-get(list.nth($map, 2), $key);
|
||||||
|
} @else {
|
||||||
|
$map: map-get($map, $key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@return $map;
|
@return $map;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,20 @@
|
||||||
:root {
|
:root {
|
||||||
$colors: map.get($vars, colors);
|
$colors: map.get($vars, colors);
|
||||||
@each $name, $val in create-vars-from-map($colors, light) {
|
@each $name, $val in create-vars-from-map($colors, light) {
|
||||||
/*! #{$name} */
|
@if str-index($name, "comment") == 1 {
|
||||||
#{$name}: #{$val};
|
/*! #{$val} */
|
||||||
|
} @else {
|
||||||
|
#{$name}: #{$val};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
&.night-mode {
|
&.night-mode {
|
||||||
@each $name, $val in create-vars-from-map($colors, dark) {
|
@each $name, $val in create-vars-from-map($colors, dark) {
|
||||||
/*! #{$name} */
|
@if str-index($name, "comment") == 1 {
|
||||||
#{$name}: #{$val};
|
/*! #{$val} */
|
||||||
|
} @else {
|
||||||
|
#{$name}: #{$val};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
@ -26,13 +32,19 @@
|
||||||
:root {
|
:root {
|
||||||
$props: map.get($vars, props);
|
$props: map.get($vars, props);
|
||||||
@each $name, $val in create-vars-from-map($props, light) {
|
@each $name, $val in create-vars-from-map($props, light) {
|
||||||
/*! #{$name} */
|
@if str-index($name, "comment") == 1 {
|
||||||
#{$name}: #{$val};
|
/*! #{$val} */
|
||||||
}
|
} @else {
|
||||||
&.night-mode {
|
|
||||||
@each $name, $val in create-vars-from-map($props, dark) {
|
|
||||||
/*! #{$name} */
|
|
||||||
#{$name}: #{$val};
|
#{$name}: #{$val};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.night-mode {
|
||||||
|
@each $name, $val in create-vars-from-map($props, dark) {
|
||||||
|
@if str-index($name, "comment") == 1 {
|
||||||
|
/*! #{$val} */
|
||||||
|
} @else {
|
||||||
|
#{$name}: #{$val};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
405
sass/_vars.scss
405
sass/_vars.scss
|
|
@ -14,277 +14,420 @@
|
||||||
$vars: (
|
$vars: (
|
||||||
props: (
|
props: (
|
||||||
border-radius: (
|
border-radius: (
|
||||||
default: 5px,
|
default: (
|
||||||
|
"Used to round corners of various UI elements",
|
||||||
|
(
|
||||||
|
default: 5px,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
large: (
|
||||||
|
"Used for big centered buttons",
|
||||||
|
(
|
||||||
|
default: 15px,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
colors: (
|
colors: (
|
||||||
white: (
|
|
||||||
default: white,
|
|
||||||
),
|
|
||||||
black: (
|
|
||||||
default: black,
|
|
||||||
),
|
|
||||||
fg: (
|
fg: (
|
||||||
default: (
|
default: (
|
||||||
light: palette(darkgray, 9),
|
"Default text/icon color",
|
||||||
dark: palette(lightgray, 0),
|
(
|
||||||
|
light: palette(darkgray, 9),
|
||||||
|
dark: palette(lightgray, 0),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
subtle: (
|
subtle: (
|
||||||
light: palette(darkgray, 6),
|
"Placeholder text, icons in idle state",
|
||||||
dark: palette(lightgray, 3),
|
(
|
||||||
|
light: palette(darkgray, 6),
|
||||||
|
dark: palette(lightgray, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
disabled: (
|
disabled: (
|
||||||
light: palette(lightgray, 9),
|
"Foreground color of disabled UI elements",
|
||||||
dark: palette(darkgray, 0),
|
(
|
||||||
|
light: palette(lightgray, 9),
|
||||||
|
dark: palette(darkgray, 0),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
faint: (
|
faint: (
|
||||||
light: palette(lightgray, 7),
|
"Foreground color that barely stands out against canvas",
|
||||||
dark: palette(darkgray, 2),
|
(
|
||||||
|
light: palette(lightgray, 7),
|
||||||
|
dark: palette(darkgray, 2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
link: (
|
||||||
|
"Hyperlink foreground color",
|
||||||
|
(
|
||||||
|
light: palette(blue, 7),
|
||||||
|
dark: palette(blue, 2),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
canvas: (
|
canvas: (
|
||||||
default: (
|
default: (
|
||||||
light: palette(lightgray, 3),
|
"Window background",
|
||||||
dark: palette(darkgray, 5),
|
(
|
||||||
|
light: palette(lightgray, 3),
|
||||||
|
dark: palette(darkgray, 5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
elevated: (
|
elevated: (
|
||||||
light: white,
|
"Slightly brighter than window background",
|
||||||
dark: palette(darkgray, 4),
|
(
|
||||||
|
light: white,
|
||||||
|
dark: palette(darkgray, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
inset: (
|
inset: (
|
||||||
light: palette(lightgray, 4),
|
"Slightly darker than window background",
|
||||||
dark: palette(darkgray, 6),
|
(
|
||||||
|
light: palette(lightgray, 4),
|
||||||
|
dark: palette(darkgray, 6),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
overlay: (
|
overlay: (
|
||||||
light: white,
|
"Background of floating elements (menus, tooltips)",
|
||||||
dark: black,
|
(
|
||||||
|
light: white,
|
||||||
|
dark: black,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
code: (
|
code: (
|
||||||
light: white,
|
"Background of code editors",
|
||||||
dark: palette(darkgray, 6),
|
(
|
||||||
|
light: white,
|
||||||
|
dark: palette(darkgray, 6),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
border: (
|
border: (
|
||||||
default: (
|
default: (
|
||||||
light: palette(lightgray, 6),
|
"Border color with medium contrast against window background",
|
||||||
dark: palette(darkgray, 7),
|
(
|
||||||
|
light: palette(lightgray, 6),
|
||||||
|
dark: palette(darkgray, 7),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
subtle: (
|
subtle: (
|
||||||
light: palette(lightgray, 5),
|
"Border color with low contrast against window background",
|
||||||
dark: palette(darkgray, 6),
|
(
|
||||||
|
light: palette(lightgray, 5),
|
||||||
|
dark: palette(darkgray, 6),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
strong: (
|
strong: (
|
||||||
light: palette(lightgray, 9),
|
"Border color with high contrast against window background",
|
||||||
dark: palette(darkgray, 1),
|
(
|
||||||
|
light: palette(lightgray, 9),
|
||||||
|
dark: palette(darkgray, 1),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
focus: (
|
focus: (
|
||||||
light: palette(blue, 5),
|
"Border color of focused input elements",
|
||||||
dark: palette(blue, 5),
|
(
|
||||||
|
light: palette(blue, 5),
|
||||||
|
dark: palette(blue, 5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
button: (
|
button: (
|
||||||
border: (
|
|
||||||
light: palette(lightgray, 6),
|
|
||||||
dark: palette(darkgray, 6),
|
|
||||||
),
|
|
||||||
focus: (
|
|
||||||
light: palette(cyan, 3),
|
|
||||||
dark: palette(cyan, 4),
|
|
||||||
),
|
|
||||||
pressed: (
|
|
||||||
shadow: (
|
|
||||||
light: palette(lightgray, 7),
|
|
||||||
dark: palette(darkgray, 7),
|
|
||||||
),
|
|
||||||
border: (
|
|
||||||
light: palette(lightgray, 9),
|
|
||||||
dark: palette(darkgray, 9),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
disabled: (
|
disabled: (
|
||||||
light: color.scale(palette(lightgray, 5), $alpha: -50%),
|
"Background color of disabled buttons",
|
||||||
dark: color.scale(palette(darkgray, 3), $alpha: -50%),
|
(
|
||||||
|
light: color.scale(palette(lightgray, 5), $alpha: -50%),
|
||||||
|
dark: color.scale(palette(darkgray, 3), $alpha: -50%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
gradient: (
|
gradient: (
|
||||||
start: (
|
start: (
|
||||||
light: white,
|
"Start value of default button gradient",
|
||||||
dark: palette(darkgray, 3),
|
(
|
||||||
|
light: white,
|
||||||
|
dark: palette(darkgray, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
end: (
|
end: (
|
||||||
light: palette(lightgray, 1),
|
"End value of default button gradient",
|
||||||
dark: palette(darkgray, 4),
|
(
|
||||||
|
light: palette(lightgray, 1),
|
||||||
|
dark: palette(darkgray, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hover: (
|
hover: (
|
||||||
gradient: (
|
gradient: (
|
||||||
start: (
|
start: (
|
||||||
light: palette(lightgray, 1),
|
"Start value of default button gradient in hover state",
|
||||||
dark: palette(darkgray, 2),
|
(
|
||||||
|
light: palette(lightgray, 1),
|
||||||
|
dark: palette(darkgray, 2),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
end: (
|
end: (
|
||||||
light: palette(lightgray, 4),
|
"End value of default button gradient in hover state",
|
||||||
dark: palette(darkgray, 3),
|
(
|
||||||
|
light: palette(lightgray, 4),
|
||||||
|
dark: palette(darkgray, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
border: (
|
border: (
|
||||||
light: palette(lightgray, 8),
|
"Border color of default button in hover state",
|
||||||
dark: palette(darkgray, 8),
|
(
|
||||||
|
light: palette(lightgray, 8),
|
||||||
|
dark: palette(darkgray, 8),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
primary: (
|
primary: (
|
||||||
gradient: (
|
gradient: (
|
||||||
start: (
|
start: (
|
||||||
light: palette(blue, 4),
|
"Start value of primary button gradient",
|
||||||
dark: color.scale(palette(blue, 6), $saturation: -10%),
|
(
|
||||||
|
light: palette(blue, 4),
|
||||||
|
dark: color.scale(palette(blue, 6), $saturation: -10%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
end: (
|
end: (
|
||||||
light: palette(blue, 6),
|
"End value of primary button gradient",
|
||||||
dark: color.scale(palette(blue, 8), $saturation: -10%),
|
(
|
||||||
|
light: palette(blue, 6),
|
||||||
|
dark: color.scale(palette(blue, 8), $saturation: -10%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hover: (
|
hover: (
|
||||||
gradient: (
|
gradient: (
|
||||||
start: (
|
start: (
|
||||||
light: palette(blue, 3),
|
"Start value of primary button gradient in hover state",
|
||||||
dark: color.scale(palette(blue, 5), $saturation: -10%),
|
(
|
||||||
|
light: palette(blue, 3),
|
||||||
|
dark: color.scale(palette(blue, 5), $saturation: -10%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
end: (
|
end: (
|
||||||
light: palette(blue, 5),
|
"End value of primary button gradient in hover state",
|
||||||
dark: color.scale(palette(blue, 7), $saturation: -10%),
|
(
|
||||||
|
light: palette(blue, 5),
|
||||||
|
dark: color.scale(palette(blue, 7), $saturation: -10%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
disabled: (
|
disabled: (
|
||||||
light: palette(blue, 3),
|
"Background of primary button in disabled state",
|
||||||
dark: color.scale(palette(blue, 5), $saturation: -10%),
|
(
|
||||||
|
light: palette(blue, 3),
|
||||||
|
dark: color.scale(palette(blue, 5), $saturation: -10%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
scrollbar: (
|
scrollbar: (
|
||||||
bg: (
|
bg: (
|
||||||
default: (
|
default: (
|
||||||
light: palette(lightgray, 5),
|
"Background of scrollbar in idle state (Win/Lin only)",
|
||||||
dark: palette(darkgray, 4),
|
(
|
||||||
|
light: palette(lightgray, 5),
|
||||||
|
dark: palette(darkgray, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
hover: (
|
hover: (
|
||||||
light: palette(lightgray, 6),
|
"Background of scrollbar in hover state (Win/Lin only)",
|
||||||
dark: palette(darkgray, 3),
|
(
|
||||||
|
light: palette(lightgray, 6),
|
||||||
|
dark: palette(darkgray, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
active: (
|
active: (
|
||||||
light: palette(lightgray, 7),
|
"Background of scrollbar in pressed state (Win/Lin only)",
|
||||||
dark: palette(darkgray, 1),
|
(
|
||||||
|
light: palette(lightgray, 7),
|
||||||
|
dark: palette(darkgray, 1),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
shadow: (
|
shadow: (
|
||||||
default: (
|
default: (
|
||||||
light: palette(lightgray, 8),
|
"Default box-shadow color",
|
||||||
dark: palette(darkgray, 7),
|
(
|
||||||
|
light: palette(lightgray, 8),
|
||||||
|
dark: palette(darkgray, 7),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
inset: (
|
inset: (
|
||||||
light: palette(lightgray, 9),
|
"Inset box-shadow color",
|
||||||
dark: palette(darkgray, 7),
|
(
|
||||||
|
light: palette(lightgray, 9),
|
||||||
|
dark: palette(darkgray, 7),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
subtle: (
|
subtle: (
|
||||||
light: palette(lightgray, 5),
|
"Box-shadow color with lower contrast against window background",
|
||||||
dark: palette(darkgray, 6),
|
(
|
||||||
|
light: palette(lightgray, 5),
|
||||||
|
dark: palette(darkgray, 6),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
focus: (
|
focus: (
|
||||||
default: palette(indigo, 5),
|
"Box-shadow color for elements in focused state",
|
||||||
|
(
|
||||||
|
default: palette(indigo, 5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
accent: (
|
accent: (
|
||||||
card: (
|
card: (
|
||||||
light: palette(blue, 4),
|
"Accent color for cards",
|
||||||
dark: palette(blue, 3),
|
(
|
||||||
|
light: palette(blue, 4),
|
||||||
|
dark: palette(blue, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
note: (
|
note: (
|
||||||
light: palette(green, 5),
|
"Accent color for notes",
|
||||||
dark: palette(green, 4),
|
(
|
||||||
),
|
light: palette(green, 5),
|
||||||
link: (
|
dark: palette(green, 4),
|
||||||
light: palette(blue, 7),
|
),
|
||||||
dark: palette(blue, 2),
|
|
||||||
),
|
),
|
||||||
danger: (
|
danger: (
|
||||||
light: palette(red, 5),
|
"Saturated accent color to grab attention",
|
||||||
dark: palette(red, 4),
|
(
|
||||||
|
light: palette(red, 5),
|
||||||
|
dark: palette(red, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
flag: (
|
flag: (
|
||||||
1: (
|
1: (
|
||||||
light: palette(red, 5),
|
"Flag 1 (red)",
|
||||||
dark: palette(red, 4),
|
(
|
||||||
|
light: palette(red, 5),
|
||||||
|
dark: palette(red, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
2: (
|
2: (
|
||||||
light: palette(orange, 4),
|
"Flag 2 (orange)",
|
||||||
dark: palette(orange, 3),
|
(
|
||||||
|
light: palette(orange, 4),
|
||||||
|
dark: palette(orange, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
3: (
|
3: (
|
||||||
light: palette(green, 4),
|
"Flag 3 (green)",
|
||||||
dark: palette(green, 3),
|
(
|
||||||
|
light: palette(green, 4),
|
||||||
|
dark: palette(green, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
4: (
|
4: (
|
||||||
light: palette(blue, 5),
|
"Flag 4 (blue)",
|
||||||
dark: palette(blue, 4),
|
(
|
||||||
|
light: palette(blue, 5),
|
||||||
|
dark: palette(blue, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
5: (
|
5: (
|
||||||
light: palette(fuchsia, 4),
|
"Flag 5 (pink)",
|
||||||
dark: palette(fuchsia, 3),
|
(
|
||||||
|
light: palette(fuchsia, 4),
|
||||||
|
dark: palette(fuchsia, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
6: (
|
6: (
|
||||||
light: palette(teal, 4),
|
"Flag 6 (turquoise)",
|
||||||
dark: palette(teal, 3),
|
(
|
||||||
|
light: palette(teal, 4),
|
||||||
|
dark: palette(teal, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
7: (
|
7: (
|
||||||
light: palette(purple, 5),
|
"Flag 7 (purple)",
|
||||||
dark: palette(purple, 4),
|
(
|
||||||
|
light: palette(purple, 5),
|
||||||
|
dark: palette(purple, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
state: (
|
state: (
|
||||||
new: (
|
new: (
|
||||||
light: palette(blue, 5),
|
"Accent color for new cards",
|
||||||
dark: palette(blue, 3),
|
(
|
||||||
|
light: palette(blue, 5),
|
||||||
|
dark: palette(blue, 3),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
learn: (
|
learn: (
|
||||||
light: palette(red, 6),
|
"Accent color for cards in learning state",
|
||||||
dark: palette(red, 4),
|
(
|
||||||
|
light: palette(red, 6),
|
||||||
|
dark: palette(red, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
review: (
|
review: (
|
||||||
light: palette(green, 6),
|
"Accent color for cards in review state",
|
||||||
dark: palette(green, 5),
|
(
|
||||||
|
light: palette(green, 6),
|
||||||
|
dark: palette(green, 5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
buried: (
|
buried: (
|
||||||
light: palette(amber, 5),
|
"Accent color for buried cards",
|
||||||
dark: palette(amber, 8),
|
(
|
||||||
|
light: palette(amber, 5),
|
||||||
|
dark: palette(amber, 8),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
suspended: (
|
suspended: (
|
||||||
light: palette(yellow, 4),
|
"Accent color for suspended cards",
|
||||||
dark: palette(yellow, 1),
|
(
|
||||||
|
light: palette(yellow, 4),
|
||||||
|
dark: palette(yellow, 1),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
marked: (
|
marked: (
|
||||||
light: palette(indigo, 2),
|
"Accent color for marked cards",
|
||||||
dark: palette(purple, 5),
|
(
|
||||||
|
light: palette(indigo, 2),
|
||||||
|
dark: palette(purple, 5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
highlight: (
|
highlight: (
|
||||||
bg: (
|
bg: (
|
||||||
light: palette(blue, 3),
|
"Background color of highlighted items",
|
||||||
dark: palette(blue, 4),
|
(
|
||||||
|
light: palette(blue, 3),
|
||||||
|
dark: palette(blue, 4),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
fg: (
|
fg: (
|
||||||
light: black,
|
"Foreground color of highlighted items",
|
||||||
dark: white,
|
(
|
||||||
|
light: black,
|
||||||
|
dark: white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
selection: (
|
selected: (
|
||||||
bg: (
|
bg: (
|
||||||
light: color.scale(palette(lightgray, 5), $alpha: -50%),
|
"Background color of selected text",
|
||||||
dark: color.scale(palette(blue, 3), $alpha: -50%),
|
(
|
||||||
|
light: color.scale(palette(lightgray, 5), $alpha: -50%),
|
||||||
|
dark: color.scale(palette(blue, 3), $alpha: -50%),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
fg: (
|
fg: (
|
||||||
light: black,
|
"Foreground color of selected text",
|
||||||
dark: white,
|
(
|
||||||
|
light: black,
|
||||||
|
dark: white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
$body-color: color(fg);
|
$body-color: color(fg);
|
||||||
$body-bg: color(canvas);
|
$body-bg: color(canvas);
|
||||||
|
|
||||||
$link-hover-color: color(accent-link);
|
$link-hover-color: color(fg-link);
|
||||||
$link-hover-decoration: none;
|
$link-hover-decoration: none;
|
||||||
|
|
||||||
$utilities: (
|
$utilities: (
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,6 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--accent-link);
|
color: var(--fg-link);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,13 +75,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
.chevron {
|
.chevron {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0 0 0 auto;
|
inset: 0 0 0 auto;
|
||||||
border-left: 1px solid var(--button-border);
|
border-left: 1px solid var(--border-subtle);
|
||||||
}
|
}
|
||||||
:global([dir="rtl"]) {
|
:global([dir="rtl"]) {
|
||||||
.chevron {
|
.chevron {
|
||||||
inset: 0 auto 0 0;
|
inset: 0 auto 0 0;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: 1px solid var(--button-border);
|
border-right: 1px solid var(--border-subtle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--base-font-size);
|
||||||
|
|
||||||
:global(a) {
|
:global(a) {
|
||||||
color: var(--accent-link);
|
color: var(--fg-link);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
.search-link:hover {
|
.search-link:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--accent-link);
|
color: var(--fg-link);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue