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

+56 -117
View File
@@ -18,50 +18,48 @@
==/UserStyle== */
@-moz-document domain("ichi.moe") {
@media (prefers-color-scheme: light) {
:root {
#catppuccin(@lightFlavor, @accentColor);
:root {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
}
@media (prefers-color-scheme: dark) {
:root {
#catppuccin(@darkFlavor, @accentColor);
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
#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];
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,
@@ -86,31 +84,24 @@
}
.panel-error {
background-color: fadeout(@red, 20%);
background-color: fade(@red, 80%);
}
.highlight {
background-color: fadeout(@yellow, 20%);
background-color: fade(@yellow, 80%);
}
.gloss {
& when (@lookup = "latte") {
background-color: @base;
border-color: @surface2;
}
background-color: @surface0;
border-color: @overlay0;
background-color: if(@flavor = "latte", @base, @surface0);
}
.gloss,
.gloss-rtext {
& when (@lookup = "latte") {
border-color: @surface2;
}
border-color: @overlay0;
border-color: if(@flavor = "latte", @surface2, @overlay0);
}
.gloss:target {
& when (@lookup = "latte") {
& when (@flavor = "latte") {
box-shadow: 0 0 5px @surface2;
-webkit-box-shadow: 0 0 5px @surface2;
-moz-box-shadow: 0 0 5px @surface2;
@@ -145,10 +136,7 @@
}
.jspDrag {
& when (@lookup = "latte") {
background-color: @surface1;
}
background-color: @surface2;
background-color: if(@flavor = "latte", @surface1, @surface2);
}
.conj-negative {
@@ -163,18 +151,9 @@
color: @green;
}
.reading-table tr:nth-of-type(2n) {
& when (@lookup = "latte") {
background: fadeout(@surface0, 50%);
}
background: fadeout(@surface1, 50%);
}
.reading-table tr:nth-of-type(2n),
table.kanji-match tr:nth-of-type(2n) {
& when (@lookup = "latte") {
background: fadeout(@surface0, 50%);
}
background: fadeout(@surface1, 50%);
background: fade(if(@flavor = "latte", @surface0, @surface1), 50%);
}
.kanji-big a {
@@ -182,19 +161,12 @@
}
.autocomplete-suggestions {
& when (@lookup = "latte") {
background: @base;
border-color: @surface2;
}
background: @surface0;
border-color: @overlay0;
border-color: if(@flavor = "latte", @surface2, @overlay0);
}
.autocomplete-suggestions,
.autocomplete-selected {
& when (@lookup = "latte") {
background: @base;
}
background: @surface0;
background: if(@flavor = "latte", @base, @surface0);
}
.autocomplete-suggestions strong {
@@ -266,7 +238,7 @@
input[type="checkbox"]:focus,
input[type="radio"]:focus,
select:focus {
& when (@lookup = "latte") {
& when (@flavor = "latte") {
background-color: @base;
border-color: @surface0;
}
@@ -284,17 +256,11 @@
}
.jspTrack {
& when (@lookup = "latte") {
background: @surface0;
}
background: @surface1;
background: if(@flavor = "latte", @surface0, @surface1);
}
.f-dropdown {
& when (@lookup = "latte") {
background-color: @base;
}
background-color: @surface0;
background-color: if(@flavor = "latte", @base, @surface0);
border-color: @subtext1;
}
@@ -323,10 +289,7 @@
table {
background: @base;
& when (@lookup = "latte") {
background-color: @surface0;
}
background-color: @surface1;
background-color: if(@flavor = "latte", @surface0, @surface1);
}
table tr th,
@@ -334,42 +297,18 @@
color: @subtext1;
}
.kanji-table td {
& when (@lookup = "latte") {
border-color: @surface0;
}
border-color: @surface1;
}
table tr.even,
table tr.alt,
table tr:nth-of-type(2n) {
& when (@lookup = "latte") {
background: fadeout(@surface0, 50%);
}
background: fadeout(@surface1, 50%);
}
.reading-table tr ~ tr > td {
& when (@lookup = "latte") {
border-color: @surface0;
}
border-color: @surface1;
}
table.kanji-match td {
& when (@lookup = "latte") {
border-color: @surface0;
}
border-color: @surface1;
background: fade(if(@flavor = "latte", @surface0, @surface1), 50%);
}
.kanji-table td,
.reading-table tr ~ tr > td,
table.kanji-match td,
tr.match-row-kanji,
tr.match-row-reading {
& when (@lookup = "latte") {
border-color: @surface0;
}
border-color: @surface1;
border-color: if(@flavor = "latte", @surface0, @surface1);
}
img {