Fix dark mode hr colour to use CSS variable instead of color-mod#1041
Fix dark mode hr colour to use CSS variable instead of color-mod#1041jonhickman wants to merge 4 commits into
Conversation
…ction v4 The color-mod(var(--color-secondary-text) l(-22%)) value compiled to #000 after postcss-color-mod-function was bumped from v3 to v4, making tags, post meta, byline and pagination text invisible on dark backgrounds. Replace with var(--color-secondary-text) directly. #979797 gives ~4.6:1 contrast on the dark mode background and sits correctly below the #fff primary text in the visual hierarchy. Same fix applied to the auto-color media query variant.
gulp-zip v6 switched to a named export. Update require() to use .default to restore the zip build task.
This reverts commit 9a71b49.
Replace color-mod(var(--color-darkmode) l(+8%)) with var(--color-secondary-text) for hr border and background in dark mode, consistent with how other secondary text colours are handled.
WalkthroughThis PR updates CSS styling for dark-mode and auto-color theme variants. The minified Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@assets/css/screen.css`:
- Around line 2279-2285: The auto-color dark-scheme HR rules still use
color-mod(...) and should mirror the explicit dark-mode rules: update the
selectors html.auto-color hr and html.auto-color .gh-content hr:after to use
var(--color-secondary-text) for border-top-color/background and use box-shadow:
var(--color-darkmode) 0 0 0 5px for the after element, replacing any
color-mod(...) expressions so auto-color users get the same high-contrast
divider as html.dark-mode.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e3702c7d-1a68-4ff1-ab78-26f68a61482e
⛔ Files ignored due to path filters (1)
assets/built/screen.css.mapis excluded by!**/*.map
📒 Files selected for processing (2)
assets/built/screen.cssassets/css/screen.css
| html.dark-mode hr { | ||
| border-top-color: color-mod(var(--color-darkmode) l(+8%)); | ||
| border-top-color: var(--color-secondary-text); | ||
| } | ||
|
|
||
| html.dark-mode .gh-content hr:after { | ||
| background: color-mod(var(--color-darkmode) l(+8%)); | ||
| background: var(--color-secondary-text); | ||
| box-shadow: var(--color-darkmode) 0 0 0 5px; |
There was a problem hiding this comment.
Mirror the HR fix in html.auto-color dark-scheme rules.
Line 2280 and Line 2284 fix explicit dark mode, but the equivalent @media (prefers-color-scheme: dark) html.auto-color HR rules still use color-mod(...), so the divider can remain too low-contrast for auto-color users.
🔧 Proposed fix
@@
- html.auto-color hr {
- border-top-color: color-mod(var(--color-darkmode) l(+8%));
- }
+ html.auto-color hr {
+ border-top-color: var(--color-secondary-text);
+ }
@@
- html.auto-color .gh-content hr:after {
- background: color-mod(var(--color-darkmode) l(+8%));
+ html.auto-color .gh-content hr:after {
+ background: var(--color-secondary-text);
box-shadow: var(--color-darkmode) 0 0 0 5px;
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@assets/css/screen.css` around lines 2279 - 2285, The auto-color dark-scheme
HR rules still use color-mod(...) and should mirror the explicit dark-mode
rules: update the selectors html.auto-color hr and html.auto-color .gh-content
hr:after to use var(--color-secondary-text) for border-top-color/background and
use box-shadow: var(--color-darkmode) 0 0 0 5px for the after element, replacing
any color-mod(...) expressions so auto-color users get the same high-contrast
divider as html.dark-mode.
|
Closing in favour of a cleaner branch — will reopen shortly. |
Summary
color-mod(var(--color-darkmode) l(+8%))withvar(--color-secondary-text)forhrborder and background in dark modeBefore
After