Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anilist): change text-bright, cleanup #1458

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions styles/anilist/catppuccin.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
#catppuccin(@darkFlavor, @accentColor);
}

// Scrollbar color
* {
scrollbar-color: @catppuccin[@@lightFlavor][@@accentColor]
fade(@catppuccin[@@darkFlavor][@crust], 0.2);
&:has(.site-theme-dark) {
scrollbar-color: @catppuccin[@@darkFlavor][@@accentColor]
fade(@catppuccin[@@darkFlavor][@crust], 0.2);
}
}

Comment on lines +28 to +37
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not completely sure if this will be fine performance-wise, but it's the only way I could style the scrollbars.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need to be applied to every single element? And why is this not in the #catppuccin mixin?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The userstyle uses the body element to select dark and light flavors, which unfortunately results in the scrollbar (Which is styled using the * selector) not being themed. It's the only way I could figure out a workaround, however I'm open to any changes.

#catppuccin(@lookup, @accent) {
@rosewater: @catppuccin[@@lookup][@rosewater];
@flamingo: @catppuccin[@@lookup][@flamingo];
Expand Down Expand Up @@ -82,10 +92,6 @@
.nav-unscoped.transparent {
background: fade(darken(@text, 10%), 50%);
}

.banner-content .name {
--color-text-bright: #rgbify(#fff) [];
}
}

--color-background: #rgbify(@crust) [];
Expand All @@ -102,7 +108,12 @@
--color-text: #rgbify(@text) [];
--color-text-light: #rgbify(@subtext1) [];
--color-text-lighter: #rgbify(@subtext0) [];
--color-text-bright: #rgbify(@text) [];
& when (@lookup =latte) {
--color-text-bright: #rgbify(@crust) [];
}
& when not (@lookup =latte) {
--color-text-bright: #rgbify(@text) [];
}
--color-blue: #rgbify(@accent-color) [];
--color-white: 255, 255, 255;
--color-black: 0, 0, 0;
Expand Down Expand Up @@ -479,15 +490,6 @@
--color-white: #rgbify(@crust) [];
}
}
.button.comment,
.settings .button,
.el-message-box .el-button--primary,
.mod-badge-wrap,
.medialist.cards .entry-card .edit {
& when not (@lookup =latte) {
--color-text-bright: #rgbify(@crust) [];
}
}
.submit-btn,
.random-btn {
& when not (@lookup =latte) {
Expand All @@ -511,11 +513,6 @@
--color-blue-300: #rgbify(@crust) [];
}
}
.settings .button {
& when (@lookup =latte) {
--color-text-bright: #rgbify(#fff) [];
}
}
/* ------------IMAGE COVER------------ */
.cover .image-text,
.plus-progress {
Expand Down
Loading