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

+58 -60
View File
@@ -18,50 +18,48 @@
==/UserStyle== */
@-moz-document domain("bstats.org") {
@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,
@@ -199,18 +197,18 @@
}
/* discord logo on homepage */
img[src="/images/discord.svg"] when (@lookup = latte) {
img[src="/images/discord.svg"] when (@flavor = latte) {
filter: saturate(210%) hue-rotate(-20deg) brightness(82%);
}
img[src="/images/discord.svg"] when (@lookup = frappe) {
img[src="/images/discord.svg"] when (@flavor = frappe) {
filter: saturate(53%) hue-rotate(-10deg) brightness(147%) contrast(90%)
sepia(15%) invert(2%);
}
img[src="/images/discord.svg"] when (@lookup = macchiato) {
img[src="/images/discord.svg"] when (@flavor = macchiato) {
filter: saturate(52%) hue-rotate(-15deg) brightness(157%) contrast(90%)
sepia(10%);
}
img[src="/images/discord.svg"] when (@lookup = mocha) {
img[src="/images/discord.svg"] when (@flavor = mocha) {
filter: saturate(38%) hue-rotate(-25deg) brightness(153%) sepia(6%);
}
@@ -240,7 +238,7 @@
}
.input-field label {
color: @accent-color !important;
color: @accent !important;
}
/* search unfocused */
input:not([type]),
@@ -273,8 +271,8 @@
input[type="number"]:focus:not([readonly]),
input[type="search"]:focus:not([readonly]),
textarea.materialize-textarea:focus:not([readonly]) {
border-bottom-color: @accent-color;
box-shadow: 0 1px 0 0 @accent-color;
border-bottom-color: @accent;
box-shadow: 0 1px 0 0 @accent;
}
/* valid input */
input:not([type]).valid,
@@ -311,7 +309,7 @@
.teal-text.text-darken-2,
.teal-text.text-lighten-3,
a {
color: @accent-color !important;
color: @accent !important;
}
.btn,
@@ -376,7 +374,7 @@
}
.dropdown-content li > a,
.dropdown-content li > span {
color: @accent-color;
color: @accent;
}
.divider {
@@ -394,12 +392,12 @@
}
}
.switch label input[type="checkbox"]:checked + .lever {
background-color: desaturate(darken(@accent-color, 25%), 50%);
& when (@lookup = latte) {
background-color: desaturate(lighten(@accent-color, 12%), 30%);
background-color: desaturate(darken(@accent, 25%), 50%);
& when (@flavor = latte) {
background-color: desaturate(lighten(@accent, 12%), 30%);
}
&::after {
background-color: @accent-color;
background-color: @accent;
}
}
@@ -409,12 +407,12 @@
background-color: @surface1;
}
.chips .chip.selected {
background-color: @accent-color;
background-color: @accent;
color: @base;
}
.chips.focus {
border-bottom-color: @accent-color;
box-shadow: 0 1px 0 0 @accent-color;
border-bottom-color: @accent;
box-shadow: 0 1px 0 0 @accent;
}
.chips .input {
color: @text;
@@ -426,7 +424,7 @@
/* HIGHCHARTS "let's hope this does'nt break"-section */
/* all the charts */
.highcharts-graph when (@graphUseAccentColor = 1) {
stroke: @accent-color;
stroke: @accent;
}
.highcharts-graph when (@graphUseAccentColor = 0) {
stroke: @red;
@@ -435,7 +433,7 @@
.highcharts-area {
fill: fade(@red, 5%) !important;
& when (@graphUseAccentColor = 1) {
fill: fade(@accent-color, 5%) !important;
fill: fade(@accent, 5%) !important;
}
}
@@ -446,7 +444,7 @@
/* map blends in with background on latte flavor */
.highcharts-map-series .highcharts-point {
stroke: @base !important;
& when (@lookup = latte) {
& when (@flavor = latte) {
stroke: @overlay0 !important;
}
}
@@ -475,14 +473,14 @@
fill: @red !important;
stroke: none !important;
& when (@graphUseAccentColor = 1) {
fill: @accent-color !important;
fill: @accent !important;
}
}
.highcharts-markers path {
fill: @red !important;
stroke: @base !important;
& when (@graphUseAccentColor = 1) {
fill: @accent-color !important;
fill: @accent !important;
}
}
@@ -587,7 +585,7 @@
color: @text !important;
&:hover {
color: @base !important;
background: @accent-color !important;
background: @accent !important;
}
}
/* pie text "shadow" */
@@ -626,7 +624,7 @@
.highcharts-label.highcharts-tooltip-box tspan[style="fill:#F44336"] {
fill: @red !important;
& when (@graphUseAccentColor = 1) {
fill: @accent-color !important;
fill: @accent !important;
}
}
/* map hover text */