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 scrollbar color for light mode #36

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

kraktus
Copy link
Member

@kraktus kraktus commented Jul 3, 2024

The scrollbar styling was applied to the whole body, and the css-variable override was missing, resulting in bad scrollbar in light mode:
Screenshot 2024-07-03 at 20 23 52

after
Screenshot 2024-07-03 at 20 23 32

these screenshots were taken from Lila instance with the updated repo synced locally, but for convenience I've added a built-in light mode with some colors in demo.js, to easily try things out. I've not put all colors since I didn't need them.
Screenshot 2024-07-03 at 20 26 53

kraktus added 3 commits July 3, 2024 19:28
The scrollbar styling was applied to the whole body, and the css-variable override was missing
based on lila extracts

`lila/ui/common/css/theme/_light.scss`
```
$c-bg: hsl(0, 0%, 100%); // alias for $c-bg-high
$c-bg-page: hsl(37, 10%, 92%);
$c-bg-low: hsl(0, 0%, 89%);
$c-bg-zebra: hsl(37, 12%, 96.5%);
$c-bg-zebra2: hsl(37, 12%, 92%);
$c-bg-popup: hsl(0, 0%, 100%); // alias for $c-bg
$c-body-gradient: hsl(37, 12%, 84%);
$c-font: hsl(0, 0%, 30%);
$c-primary: hsl(209, 77%, 46%);
$c-brag: hsl(37, 74%, 48%);
$c-shade: hsl(0, 0%, 84%);
$c-inaccuracy: hsl(202, 78%, 40%);
$c-mistake: hsl(41, 100%, 35%);
$c-blunder: hsl(0, 68%, 50%);
$c-good: $c-secondary;
$c-brilliant: hsl(129, 71%, 30%);
$c-interesting: hsl(307, 80%, 59%);
$c-dimmer: #fff;
$c-clearer: #000;
```

`lila/ui/common/css/component/_lichess-pgn-viewer.scss`
```
--c-lpv-accent: #{$c-primary};
--c-lpv-bg: #{$c-bg-zebra};
--c-lpv-bg-player: var(--c-lpv-bg);
--c-lpv-bg-controls: var(--c-lpv-bg);
--c-lpv-bg-movelist: var(--c-lpv-bg);
--c-lpv-bg-variation: #{$c-bg-zebra2};
--c-lpv-bg-pane: #{$m-bg-zebra2--fade-1};
--c-lpv-pgn-text: #{$c-bg-zebra2};
--c-lpv-font: #{$c-font};
--c-lpv-font-shy: #{$c-font-dim};
--c-lpv-accent-over: #{$c-over};
--c-lpv-fbt-hover: #{$m-primary_bg--mix-75};
--c-lpv-font-bg: #{$m-font_bg--mix-20};
--c-lpv-current-move: #{$m-primary_bg--mix-70};
--c-lpv-move-hover: #{$m-primary_bg--mix-30};
--c-lpv-border: #{$c-border};
--c-lpv-side-border: hsl(37deg, 5%, 13%); //#{$c-border-page};
--c-lpv-inaccuracy: #{$c-inaccuracy};
--c-lpv-mistake: #{$c-mistake};
--c-lpv-blunder: #{$c-blunder};
--c-lpv-good-move: #{$c-good};
--c-lpv-brilliant: #{$c-brilliant};
--c-lpv-interesting: #{$c-interesting};
--c-lpv-bg-inaccuracy-hover: #{$m-inaccuracy_bg--mix-30};
--c-lpv-bg-mistake-hover: #{$m-mistake_bg--mix-30};
--c-lpv-bg-blunder-hover: #{$m-blunder_bg--mix-30};
--c-lpv-bg-good-hover: #{$m-good_bg--mix-30};
--c-lpv-bg-brilliant-hover: #{$m-brilliant_bg--mix-30};
--c-lpv-bg-interesting-hover: #{$m-interesting_bg--mix-30};
```
@kraktus kraktus changed the title Fix scrollbar color Fix scrollbar color for light mode Jul 3, 2024
@ornicar ornicar merged commit d99e5aa into lichess-org:master Jul 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants