Repository navigation
DARK MODE - #3617
DARK MODE#3617
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3617 +/- ##
=======================================
Coverage 76.80% 76.80%
=======================================
Files 71 71
Lines 2522 2522
Branches 360 360
=======================================
Hits 1937 1937
Misses 455 455
Partials 130 130 🚀 New features to boost your workflow:
|
89428d5 to
294fae9
Compare
|
|
||
| # files that have inline <script> tags | ||
| my %skip = map { $_ => 1 } (); | ||
| my %skip = map { $_ => 1 } ('root/base.tx'); |
There was a problem hiding this comment.
This isn't needed when using an external js file.
There was a problem hiding this comment.
I didn't think so either, but the test failed until I added it. I'll test again.
There was a problem hiding this comment.
Looks like the checks the test is doing need to be fixed.
| <html lang="en-US"> | ||
| <head> | ||
| <script>(function(){var t=localStorage.getItem('theme');if(!t)t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'light';document.documentElement.setAttribute('data-bs-theme',t)})()</script> | ||
| <script src="/static/js/theme-init.js"></script> |
There was a problem hiding this comment.
This could present caching problems if the script needed to be changed. It's simple enough that we may think that's acceptable.
Probably needs blocking="render".
| @@ -0,0 +1,7 @@ | |||
| (function () { | |||
| var t = localStorage.getItem('theme'); | |||
There was a problem hiding this comment.
If this was a let rather than a var, the wrapping anon function would not be needed.
The file probably wants a 'use strict';
294fae9 to
e21699a
Compare
theme-init must be render-blocking to prevent flash of unstyled content
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
GitHub and Codeberg ship solid-black marks that vanish on the dark author sidebar. Invert only the grayscale ones; colored logos would have their brand hue distorted. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
.sponsors-tier-price never matched; the real class is .sponsor-tier-price, so the amounts stayed near-black on the dark card. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Footer used <img>, so the page's --text-color could not reach the SVG; the invert/hue-rotate hack made the wordmark grey and shifted the brand dots. Use inline <use href=...#logo> like the header so one color source drives both. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
- .testers-fail red #f44336 (4.04:1) -> #f87168 (5.35:1) - .pod-placeholder label: set body color (was inherited grey, 2.97:1) - scope .qtip-content th dark bg to .qtip-github so non-github tooltips don't get dark-on-dark header text Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Grey gutter numbers were 1.11:1 on the green current-line band and effectively invisible. Flip them to the dark body-bg color (4.63:1) without recoloring the band. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The toggle's label already flips Show/Hide Pod; the extra bold + filled background on the not-hidden state just read as arbitrary. Drop it so the button looks the same in both states (hover still gives feedback). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
"Show"/"Hide" render at different widths, so the button jumped ~5px on toggle. Wrap the two verbs and overlay them in one grid cell (visibility, not display) so the button always reserves the wider label. No magic numbers; adapts to font size and zoom. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
e21699a to
31173bf
Compare
|
I think all of the comments have been addressed. I've also done an a11y audit for contrast which picked up a few things that are now fixed as well. |





No description provided.