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

+149 -155
View File
@@ -19,50 +19,48 @@
==/UserStyle== */
@-moz-document domain("twitter.com"), domain("x.com") {
@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,
@@ -91,7 +89,7 @@
box-shadow: @default-shadow;
& when (@darkenShadows = 1) {
box-shadow: if(@lookup = latte, @default-shadow, @black-shadow);
box-shadow: if(@flavor = latte, @default-shadow, @black-shadow);
}
}
@@ -102,7 +100,7 @@
filter: @default-shadow;
& when (@darkenShadows = 1) {
filter: if(@lookup = latte, @default-shadow, @black-shadow);
filter: if(@flavor = latte, @default-shadow, @black-shadow);
}
}
@@ -117,7 +115,7 @@
box-shadow: @default-shadow;
& when (@darkenShadows = 1) {
box-shadow: if(@lookup = latte, @default-shadow, @black-shadow);
box-shadow: if(@flavor = latte, @default-shadow, @black-shadow);
}
}
}
@@ -134,7 +132,7 @@
}
[style*="scrollbar-color: rgb(62, 65, 68) rgb(22, 24, 28)"] {
scrollbar-color: @accent-color transparent !important;
scrollbar-color: @accent transparent !important;
scrollbar-width: thin;
}
@@ -176,7 +174,7 @@
// white text, seems to appear on accent colors
.r-jwli3a {
color: if(@lookup = latte, #fff, @crust);
color: if(@flavor = latte, #fff, @crust);
// cw svg
&:has(
@@ -228,12 +226,12 @@
// active border for dms
.r-1pbtemp {
border-right-color: @accent-color;
border-right-color: @accent;
}
// accent color borders
.r-vhj8yc {
border-color: @accent-color;
border-color: @accent;
}
// magnifying glass in search bar
@@ -252,37 +250,37 @@
// bg color accent
.r-l5o3uw {
background-color: @accent-color;
background-color: @accent;
.r-jwli3a {
color: if(@lookup = latte, #fff, @crust);
color: if(@flavor = latte, #fff, @crust);
}
}
// accent element when hovered
.r-1vtznih {
background-color: darken(@accent-color, 10%);
background-color: darken(@accent, 10%);
.r-jwli3a {
color: if(@lookup = latte, #fff, @crust);
color: if(@flavor = latte, #fff, @crust);
}
}
.r-1peqgm7 {
background-color: fade(@accent-color, 10%);
background-color: fade(@accent, 10%);
}
// accent element when active
.r-yuvema {
background-color: darken(@accent-color, 15%);
background-color: darken(@accent, 15%);
.r-jwli3a {
color: if(@lookup = latte, #fff, @crust);
color: if(@flavor = latte, #fff, @crust);
}
}
.r-r18ze4 {
background-color: fade(@accent-color, 20%);
background-color: fade(@accent, 20%);
}
// white elements when hovered
@@ -307,12 +305,12 @@
// polls
.r-eok2q2 {
background-color: fade(@accent-color, 60%);
background-color: fade(@accent, 60%);
}
// box shadow around active poll input box
.r-9cip40 {
box-shadow: @accent-color 0 0 0 1px;
box-shadow: @accent 0 0 0 1px;
}
// spaces
@@ -389,12 +387,12 @@
}
.r-11mg6pl {
border-color: if(@lookup = latte, #fff, @crust); // white border
border-color: if(@flavor = latte, #fff, @crust); // white border
}
// mask over layer
.r-11z020y {
background-color: fade(desaturate(darken(@accent-color, 10%), 50%), 12%);
background-color: fade(desaturate(darken(@accent, 10%), 50%), 12%);
}
// likes
@@ -423,7 +421,7 @@
// bell svg on notifications page
.r-1cvl2hr {
color: @accent-color;
color: @accent;
}
// retweet svg on notifications page
@@ -496,7 +494,7 @@
[stroke="#1D9BF0" i],
[style*="stroke: rgb(29, 155, 240)"] {
stroke: @accent-color !important;
stroke: @accent !important;
}
[stroke="#FFD400" i] {
@@ -509,7 +507,7 @@
// "we received your report" svg
[fill="#1DA1F2" i] {
fill: if(@lookup = latte, darken(@sky, 15%), darken(@sky, 30%))
fill: if(@flavor = latte, darken(@sky, 15%), darken(@sky, 30%))
!important;
}
@@ -548,11 +546,11 @@
}
[style*="border-color: rgb(103, 7, 15)"] {
border-color: fadeout(@red, 50%) !important;
border-color: fade(@red, 50%) !important;
}
[style*="border-color: rgb(29, 155, 240)"] {
border-color: @accent-color !important;
border-color: @accent !important;
}
[style*="color: rgb(231, 233, 234)"]:not(
@@ -629,16 +627,16 @@
[style*="color: rgb(29, 155, 240)"]:not(
[style*="background-color: rgb(29, 155, 240)"]
) {
color: @accent-color !important;
color: @accent !important;
}
// background colors
[style*="background-color: rgb(142, 205, 248)"] {
background-color: lighten(@accent-color, 10%) !important;
background-color: lighten(@accent, 10%) !important;
}
[style*="background-color: rgb(2, 17, 61)"] {
background-color: fade(@accent-color, 15%) !important;
background-color: fade(@accent, 15%) !important;
}
[style*="background-color: rgba(255, 255, 255, 0.25)"] {
@@ -650,17 +648,17 @@
// for toggle circle
+ [style*="background-color: rgb(250, 250, 250)"] when not(
@lookup = latte
@flavor = latte
) {
background-color: @text !important;
}
}
[style*="background-color: rgb(29, 155, 240)"] {
background-color: @accent-color !important;
background-color: @accent !important;
[style*="color: rgb(255, 255, 255)"] {
color: if(@lookup = latte, #fff, @crust) !important;
color: if(@flavor = latte, #fff, @crust) !important;
}
}
@@ -668,7 +666,7 @@
background-color: @text !important;
[style*="color: rgb(15, 20, 25)"] {
color: if(@lookup = latte, #fff, @crust) !important;
color: if(@flavor = latte, #fff, @crust) !important;
}
}
@@ -676,7 +674,7 @@
background-color: @red !important;
[style*="color: rgb(255, 255, 255)"] {
color: if(@lookup = latte, #fff, @crust) !important;
color: if(@flavor = latte, #fff, @crust) !important;
}
}
@@ -715,7 +713,7 @@
[style*="background-color: rgb(231, 233, 234)"]
),
[color="white"] {
color: if(@lookup = latte, #fff, @crust) !important;
color: if(@flavor = latte, #fff, @crust) !important;
}
}
@@ -737,7 +735,7 @@
// dms have to be here bc of the above
.r-eff69c {
background-color: darken(@accent-color, 5%);
background-color: darken(@accent, 5%);
[style*="color: rgb(255, 255, 255)"] {
color: @crust !important;
@@ -747,7 +745,7 @@
// follow button
[data-testid$="-follow"] {
[style*="color: rgb(15, 20, 25)"] {
color: if(@lookup = latte, #fff, @crust) !important;
color: if(@flavor = latte, #fff, @crust) !important;
}
}
@@ -759,7 +757,7 @@
// options
& when (@colorizeLogo = 1) {
path[d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"] {
fill: @accent-color !important;
fill: @accent !important;
}
}
@@ -770,45 +768,43 @@
}
@-moz-document domain("api.twitter.com"), domain("api.x.com") {
@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];
html {
background: @mantle;
@@ -870,12 +866,12 @@
.button.selected,
.follow-button .unfollow .button {
background-color: @accent-color;
color: if(@lookup = latte, #fff, @crust);
border-color: darken(@accent-color, 10%);
background-color: @accent;
color: if(@flavor = latte, #fff, @crust);
border-color: darken(@accent, 10%);
&:hover {
background-color: darken(@accent-color, 10%);
background-color: darken(@accent, 10%);
}
.app-info,
@@ -891,45 +887,43 @@
}
@-moz-document domain("twitter.com"), domain("x.com") {
@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];
#session a,
#session input,
@@ -945,8 +939,8 @@
button:hover,
input:focus,
input:hover {
color: if(@lookup = latte, #fff, @crust);
background-color: @accent-color;
color: if(@flavor = latte, #fff, @crust);
background-color: @accent;
}
}
@@ -981,14 +975,14 @@
}
.submit-btn {
background-color: @accent-color;
color: if(@lookup = latte, #fff, @crust);
border-color: darken(@accent-color, 10%);
background-color: @accent;
color: if(@flavor = latte, #fff, @crust);
border-color: darken(@accent, 10%);
}
.submit-btn:hover,
.redirect-btn:hover {
background-color: darken(@accent-color, 10%);
background-color: darken(@accent, 10%);
}
.block-btn {
@@ -999,8 +993,8 @@
.mute-btn,
.unfollow-btn,
.email-report-btn {
color: @accent-color;
border-color: @accent-color;
color: @accent;
border-color: @accent;
}
.list-btn {