-
-
Notifications
You must be signed in to change notification settings - Fork 237
feat(lichess): unthemed UI elements #1897
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
base: main
Are you sure you want to change the base?
Conversation
|
I can't figure out how to style the |
What are you referring to? |
|
Oh yeah native range sliders are terrible to theme. You can set the |
|
rip |
|
@uncenter Is there a way to style elements that are styled inline? In the registration page, the password complexity bar has spans that get directly styled when the password complexity increases: |
.password-complexity-meter {
[style="background-color: red;"] {
background-color: @red !important;
}
}Note the |
Sick! Thanks for that. Learning something new every day lol |
…e background on hover
uncenter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to push some other fixes I've made after going over the site if you don't mind.
styles/lichess/catppuccin.user.less
Outdated
| @lastMove: @catppuccin[@@flavor][@@lastMoveColor]; | ||
| @check: @catppuccin[@@flavor][@@checkColor]; | ||
|
|
||
| * { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid using the * selector? On what elements does the base Lichess website apply these variables to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could avoid using it. I just remember that quite a few of those variables like --c-good are used quite a bit for different elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should just copy whatever selector they set variables to, or be more specific and explicit by listing out the descendants where we need to reapply variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this is showing, could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uncenter Hey just wondering, in the userstyles contributing docs, we have:

How are we supposed to theme using the variables if not for using *? This may be a dumb question but I don't actually have much experience with web development 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS variables, like other CSS properties, are inherited by descendant elements. If you set --foo: red; on the :root/html/body element, every element in the tree below will have --foo as red unless it is overridden somewhere. So we often only need to theme the variables at the very top, and occasionally - as in this case - we have to set them again at a few nodes/selectors where the original site overrides them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I could just make the variables apply to :root like this instead, right?
#catppuccin(@flavor) {
#lib.palette();
#lib.defaults();
@lastMove: @catppuccin[@@flavor][@@lastMoveColor];
@check: @catppuccin[@@flavor][@@checkColor];
--c-accent: @accent;
--c-bad: @red;
--c-bg-box: @base;
--c-bg-header-dropdown: @surface0;
--c-bg-popup: @surface0;
--c-bg-zebra: @mantle;
--c-border: @surface0;
--c-brag: @peach;
--c-contours: @flamingo;
--c-dasher: @accent;
--c-dasher-light: @accent;
--c-good: @green;
--c-error: @red;
--c-link: @blue;
--c-primary: @accent;
--c-shade: @surface1;
--c-over: @base;
--c-font: @text;
--c-font-clear: @text;
--c-font-clearer: @text;
--c-font-dim: @subtext1;
--c-font-dimmer: @subtext0;
--m-font_dimmer--mix-85: @overlay2;
--m-accent--fade-50: fade(@accent, 50%);
--m-accent--fade-80: fade(@accent, 20%);
--m-secondary--fade-30: fade(@green, 70%);
--c-bg-page: @mantle;
--c-body-gradient: @base;
...Seems like this is how the Github userstyle works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
Themes the lichess logo behind the quick pairing section and adjusts the quick pairing buttons, adjusts the background gradient , change some items from red/peach to accent, radio label base bg
Of course, feel free to make any changes! |
|
Lmk if any of |
…lled header border
|
Is this ready for re-review? |
No, it's not. Some things seemed to have regressed and some pages are still not themed yet. I'm currently quite busy with other things and I'd prefer to work on #1966 first if that's all good. |
|
No worries! Just wanted to make sure I wasn't holding anything up here. :) |










🔧 What does this fix? 🔧
This pull request aims to theme the following from #1891:
Additionally:
Screenshots:
🗒 Checklist 🗒