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

+57 -60
View File
@@ -16,57 +16,54 @@
==/UserStyle== */
@-moz-document domain("docs.rs"), domain("doc.rust-lang.org") {
@media (prefers-color-scheme: light) {
:root:not([data-docs-rs-theme]) {
#catppuccin(@lightFlavor, @accentColor);
:root:not([data-docs-rs-theme]) {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
@media (prefers-color-scheme: dark) {
:root:not([data-docs-rs-theme]) {
#catppuccin(@darkFlavor, @accentColor);
}
}
:root[data-docs-rs-theme="dark"] {
#catppuccin(@darkFlavor, @accentColor);
#catppuccin(@darkFlavor);
}
:root[data-docs-rs-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];
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,
@@ -79,11 +76,11 @@
--color-background-code: @mantle;
--color-background: @base;
--input-color: @text;
--input-box-shadow-focus: 0 0 8px 4px @accent-color;
--input-box-shadow-focus: 0 0 8px 4px @accent;
--color-border-light: @surface2;
--color-border: @surface0;
--color-doc-link-background: @accent-color;
--color-doc-link-hover: @accent-color;
--color-doc-link-background: @accent;
--color-doc-link-hover: @accent;
--color-error-hover: red;
--color-error: red;
--color-macro: red;
@@ -94,7 +91,7 @@
--color-brand: @text;
--color-struct: red;
--color-type: @peach;
--color-url: @accent-color;
--color-url: @accent;
--color-warn-background: @peach;
--color-warn-msg: @crust;
--color-warn-hover: red;
@@ -108,10 +105,10 @@
--main-background-color: @base;
--main-color: @text;
--settings-input-color: @accent-color;
--settings-input-color: @accent;
--settings-input-border-color: @surface0;
--settings-button-color: @text;
--settings-button-border-focus: @accent-color;
--settings-button-border-focus: @accent;
--sidebar-background-color: @mantle;
--sidebar-background-color-hover: @crust;
--source-sidebar-background-selected: @surface0;
@@ -123,7 +120,7 @@
--right-side-color: @surface2;
--code-attribute-color: @yellow;
--toggles-color: @subtext1;
--search-input-focused-border-color: @accent-color;
--search-input-focused-border-color: @accent;
--copy-path-button-color: @text;
--codeblock-error-hover-color: @red;
--codeblock-error-color: fade(@red, 70%);
@@ -136,11 +133,11 @@
--function-link-color: @green;
--macro-link-color: @green;
--keyword-link-color: @yellow;
--mod-link-color: @accent-color;
--link-color: @accent-color;
--sidebar-link-color: @accent-color;
--mod-link-color: @accent;
--link-color: @accent;
--sidebar-link-color: @accent;
--sidebar-current-link-background-color: @surface0;
--search-result-link-focus-background-color: fade(@accent-color, 20%);
--search-result-link-focus-background-color: fade(@accent, 20%);
--search-result-border-color: @surface0;
--search-color: @text;
--search-error-code-background-color: red;
@@ -149,10 +146,10 @@
--search-tab-title-count-color: @subtext0;
--search-tab-button-not-selected-border-top-color: @crust;
--search-tab-button-not-selected-background: @crust;
--search-tab-button-selected-border-top-color: @accent-color;
--search-tab-button-selected-border-top-color: @accent;
--search-tab-button-selected-background: @base;
--stab-background-color: @surface0;
--stab-code-color: @accent-color;
--stab-code-color: @accent;
--code-highlight-kw-color: @mauve;
--code-highlight-kw-2-color: @mauve;
--code-highlight-lifetime-color: @blue;
@@ -183,14 +180,14 @@
--color-syntax-question-mark: @teal;
--color-syntax-self: @red;
--color-syntax-string: @green;
--src-line-numbers-span-color: @accent-color;
--src-line-number-highlighted-background-color: fade(@accent-color, 30%);
--src-line-numbers-span-color: @accent;
--src-line-number-highlighted-background-color: fade(@accent, 30%);
--test-arrow-color: #dedede;
--test-arrow-background-color: red;
--test-arrow-hover-color: #dedede;
--test-arrow-hover-background-color: red;
--target-background-color: fade(@accent-color, 10%);
--target-border-color: @accent-color;
--target-background-color: fade(@accent, 10%);
--target-border-color: @accent;
--kbd-color: @text;
--kbd-background: @mantle;
--kbd-box-shadow-color: @surface1;
@@ -201,8 +198,8 @@
--codeblock-link-background: fade(@surface0, 50%);
--scrape-example-toggle-line-background: red;
--scrape-example-toggle-line-hover-background: red;
--scrape-example-code-line-highlight: fade(@accent-color, 40%);
--scrape-example-code-line-highlight-focus: fade(@accent-color, 40%);
--scrape-example-code-line-highlight: fade(@accent, 40%);
--scrape-example-code-line-highlight-focus: fade(@accent, 40%);
--scrape-example-help-border-color: @subtext0;
--scrape-example-help-color: @subtext1;
--scrape-example-help-hover-border-color: @text;