Skip to content

Conversation

@zenoix
Copy link
Contributor

@zenoix zenoix commented Sep 8, 2025

🔧 What does this fix? 🔧

This pull request aims to theme the following from #1891:

  • Hamburger menu icon
  • Hamburger menu headers/sections
  • Settings menu item hovers
  • Stockfish configuration buttons
  • Sign in, register page (input borders, sign in button)
  • Preference options
  • Game selector on main page

Additionally:

  • Settings menu sub-menu items (except sliders feat(lichess): unthemed UI elements #1897 (comment))
  • Top bar gradient when the page is slightly scrolled down
  • Button selectors for play with the computer
  • Unthemed running clock
  • Invite friend to game (and most likely the received invitation page)
  • Main page tournament progress bars
  • Analysis eval bar

Screenshots:

image image image image image image image image image image image image image image image

🗒 Checklist 🗒

@zenoix zenoix linked an issue Sep 8, 2025 that may be closed by this pull request
7 tasks
@github-actions github-actions bot added the lichess Lichess label Sep 8, 2025
@zenoix
Copy link
Contributor Author

zenoix commented Sep 10, 2025

I can't figure out how to style the input sliders in the settings menu so if anyone knows how, let me know or feel free to implement it :)

@uncenter
Copy link
Member

I can't figure out how to style the input sliders in the settings menu so if anyone knows how, let me know or feel free to implement it :)

What are you referring to?

@zenoix
Copy link
Contributor Author

zenoix commented Sep 10, 2025

What are you referring to?

These sliders:
image
image

@uncenter
Copy link
Member

Oh yeah native range sliders are terrible to theme. You can set the accent-color bit but the rest is not worth it.

@zenoix
Copy link
Contributor Author

zenoix commented Sep 10, 2025

rip

@zenoix
Copy link
Contributor Author

zenoix commented Sep 10, 2025

@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:
image

@uncenter
Copy link
Member

.password-complexity-meter {
  [style="background-color: red;"] {
    background-color: @red !important;
  }
}

Note the !important to override the inline styles.

@zenoix
Copy link
Contributor Author

zenoix commented Sep 10, 2025

.password-complexity-meter {
  [style="background-color: red;"] {
    background-color: @red !important;
  }
}

Note the !important to override the inline styles.

Sick! Thanks for that. Learning something new every day lol

@zenoix
Copy link
Contributor Author

zenoix commented Sep 20, 2025

This was already set to red when I started working on the Lichess theming

Changed

image image

@zenoix
Copy link
Contributor Author

zenoix commented Sep 20, 2025

In yellow, the text contrast is poor.

Okay, for this it seems like I trolled. Not sure how I didn't notice it regressing but I fixed it, apologies!

image

@zenoix
Copy link
Contributor Author

zenoix commented Sep 20, 2025

Also themed the puzzle dashboard page (bottom visualisation is a canvas and not sure if it's possible to style those):
image

@zenoix zenoix requested a review from uncenter September 21, 2025 00:55
Copy link
Member

@uncenter uncenter left a 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.

@lastMove: @catppuccin[@@flavor][@@lastMoveColor];
@check: @catppuccin[@@flavor][@@checkColor];

* {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh... this is going to be painful

image image

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

In the styles panel there is a link to the source CSS for rules that you can go to:

CleanShot 2025-10-15 at 08 14 21

Copy link
Contributor Author

@zenoix zenoix Oct 16, 2025

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:
image

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 😅

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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
@zenoix
Copy link
Contributor Author

zenoix commented Oct 7, 2025

I'm going to push some other fixes I've made after going over the site if you don't mind.

Of course, feel free to make any changes!

@uncenter
Copy link
Member

uncenter commented Oct 7, 2025

Lmk if any of 05f1509 (#1897) doesn't make sense or breaks anything!

@uncenter uncenter added the 2.status: changes-requested Changes requested by reviewers must be attended to by author before further review label Oct 9, 2025
@uncenter uncenter removed the 2.status: changes-requested Changes requested by reviewers must be attended to by author before further review label Nov 4, 2025
@uncenter
Copy link
Member

uncenter commented Nov 4, 2025

Is this ready for re-review?

@zenoix
Copy link
Contributor Author

zenoix commented Nov 4, 2025

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.

@zenoix zenoix marked this pull request as draft November 4, 2025 01:46
@uncenter
Copy link
Member

uncenter commented Nov 4, 2025

No worries! Just wanted to make sure I wasn't holding anything up here. :)

@zachtheyek zachtheyek mentioned this pull request Nov 19, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lichess Lichess

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lichess unthemed UI elements

2 participants