refactor(tree-wide): misc improvements (#1547)

This commit is contained in:
uncenter authored and GitHub committed 2024-12-31 17:52:08 -05:00
1 parent 3e6ecfbf86
commit 6121f23d7c
126 files changed
+8047 -8021

No files matched your search

+45 -47
View File
@@ -16,63 +16,61 @@
==/UserStyle== */
@-moz-document domain("jisho.org") {
@media (prefers-color-scheme: light) {
:root[data-color-theme="auto"] {
#catppuccin(@lightFlavor, @accentColor);
:root[data-color-theme="auto"] {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
}
@media (prefers-color-scheme: dark) {
:root[data-color-theme="auto"] {
#catppuccin(@darkFlavor, @accentColor);
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
:root[data-color-theme="dark"] {
#catppuccin(@darkFlavor, @accentColor);
#catppuccin(@darkFlavor);
}
:root[data-color-theme="light"] {
#catppuccin(@lightFlavor, @accentColor);
#catppuccin(@lightFlavor);
}
#catppuccin(@lookup, @accent) {
@rosewater: @catppuccin[@@lookup][@rosewater];
@flamingo: @catppuccin[@@lookup][@flamingo];
@pink: @catppuccin[@@lookup][@pink];
@mauve: @catppuccin[@@lookup][@mauve];
@red: @catppuccin[@@lookup][@red];
@maroon: @catppuccin[@@lookup][@maroon];
@peach: @catppuccin[@@lookup][@peach];
@yellow: @catppuccin[@@lookup][@yellow];
@green: @catppuccin[@@lookup][@green];
@teal: @catppuccin[@@lookup][@teal];
@sky: @catppuccin[@@lookup][@sky];
@sapphire: @catppuccin[@@lookup][@sapphire];
@blue: @catppuccin[@@lookup][@blue];
@lavender: @catppuccin[@@lookup][@lavender];
@text: @catppuccin[@@lookup][@text];
@subtext1: @catppuccin[@@lookup][@subtext1];
@subtext0: @catppuccin[@@lookup][@subtext0];
@overlay2: @catppuccin[@@lookup][@overlay2];
@overlay1: @catppuccin[@@lookup][@overlay1];
@overlay0: @catppuccin[@@lookup][@overlay0];
@surface2: @catppuccin[@@lookup][@surface2];
@surface1: @catppuccin[@@lookup][@surface1];
@surface0: @catppuccin[@@lookup][@surface0];
@base: @catppuccin[@@lookup][@base];
@mantle: @catppuccin[@@lookup][@mantle];
@crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent];
#catppuccin(@flavor) {
@rosewater: @catppuccin[@@flavor][@rosewater];
@flamingo: @catppuccin[@@flavor][@flamingo];
@pink: @catppuccin[@@flavor][@pink];
@mauve: @catppuccin[@@flavor][@mauve];
@red: @catppuccin[@@flavor][@red];
@maroon: @catppuccin[@@flavor][@maroon];
@peach: @catppuccin[@@flavor][@peach];
@yellow: @catppuccin[@@flavor][@yellow];
@green: @catppuccin[@@flavor][@green];
@teal: @catppuccin[@@flavor][@teal];
@sky: @catppuccin[@@flavor][@sky];
@sapphire: @catppuccin[@@flavor][@sapphire];
@blue: @catppuccin[@@flavor][@blue];
@lavender: @catppuccin[@@flavor][@lavender];
@text: @catppuccin[@@flavor][@text];
@subtext1: @catppuccin[@@flavor][@subtext1];
@subtext0: @catppuccin[@@flavor][@subtext0];
@overlay2: @catppuccin[@@flavor][@overlay2];
@overlay1: @catppuccin[@@flavor][@overlay1];
@overlay0: @catppuccin[@@flavor][@overlay0];
@surface2: @catppuccin[@@flavor][@surface2];
@surface1: @catppuccin[@@flavor][@surface1];
@surface0: @catppuccin[@@flavor][@surface0];
@base: @catppuccin[@@flavor][@base];
@mantle: @catppuccin[@@flavor][@mantle];
@crust: @catppuccin[@@flavor][@crust];
@accent: @catppuccin[@@flavor][@@accentColor];
@accent-dim: if(
(@lookup = latte),
desaturate(lighten(@accent-color, 8%), 10%),
desaturate(darken(@accent-color, 8%), 10%)
@flavor = latte,
desaturate(lighten(@accent, 8%), 10%),
desaturate(darken(@accent, 8%), 10%)
);
color-scheme: if(@lookup = latte, light, dark);
color-scheme: if(@flavor = latte, light, dark);
::selection {
background-color: fade(@accent-color, 30%);
background-color: fade(@accent, 30%);
}
input,
@@ -87,7 +85,7 @@
color: @text;
a {
color: @accent-color;
color: @accent;
&:hover {
color: @accent-dim;
@@ -149,7 +147,7 @@
h1.logo a {
background-image: if(
@lookup = latte,
@flavor = latte,
url("//assets.jisho.org/assets/jisho-logo-v4@2x-7330091c079b9dd59601401b052b52e103978221c8fb6f5e22406d871fcc746a.png"),
url("//assets.jisho.org/assets/jisho-logo-v4-dark@2x-e676613b426d34187b61928823730a225b52165aaef99f948bd3dc5fc16fa787.png")
);
@@ -290,7 +288,7 @@
.speech_area_active #speech_button,
.radical_area_active #radical_button,
.handwriting_area_active #handwriting_button {
border-bottom-color: @accent-color;
border-bottom-color: @accent;
}
#what_is_this {
@@ -400,7 +398,7 @@
.noUi-target {
.noUi-background {
background-color: @accent-color;
background-color: @accent;
}
.noUi-base {
@@ -484,7 +482,7 @@
footer {
.ornament {
background-color: @red;
box-shadow: 0 0 10px 5px if(@lookup = latte, @base, @overlay0);
box-shadow: 0 0 10px 5px if(@flavor = latte, @base, @overlay0);
}
}
}