fix(eink): make Custom Fonts panel readable in e-ink mode (#4454) - #4464
Merged
Conversation
The selected custom-font card used `bg-primary/50`, whose opacity suffix dodges the e-ink `.bg-primary` normalizer — leaving a dark primary fill under force-black `text-base-content` text, i.e. black-on-black (#4454). Add `eink-bordered` so the selected card gets the same white-bg / black-border / black-text treatment every other selected surface gets, while staying distinct from the faint-bordered unselected cards. The Import Font "+" badge had the same class of bug: e-ink's substring matchers catch its `group-hover:bg-base-content` and `text-base-content/60` utilities and paint a black glyph on a black circle. Pin the badge to an intentional base-content circle with a base-100 glyph so the "+" stays legible. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chrox
force-pushed
the
fix/eink-custom-font-selected-readability
branch
from
June 4, 2026 16:23
3160c07 to
aaeb4ef
Compare
dalzyu
added a commit
to dalzyu/readest-hermes
that referenced
this pull request
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On e-ink devices the Custom Fonts settings panel had two unreadable spots:
Selected font card — the selected family showed black text on a black fill (issue Eink - The selected Custom Font is not readable #4454). The card uses
bg-primary/50, and the/50opacity suffix produces the classbg-primary\/50, which the exact[data-eink] .bg-primarynormalizer selector never matches. So the dark primary fill survived whiletext-base-contentwas forced black → black-on-black.Import Font "+" badge — the "+" glyph rendered black on a black circle. E-ink's substring matchers (
[class*='bg-base-content'],[class*='text-base-content']) catch the badge'sgroup-hover:bg-base-contentandtext-base-content/60utilities and force both the circle and glyph tobase-content.Fix
eink-borderedto the selected card so it routes through the same white-bg / black-border / black-text treatment every other primary-selected surface gets in e-ink — readable, and still distinct from the faint-bordered unselected cards.import-font-add-badgehook inglobals.css, so the "+" contrasts against the dark circle.Normal (color) mode is unchanged — both rules are scoped to
[data-eink='true'].Verification
Confirmed against the live compiled stylesheet in the real component under e-ink mode:
oklch(1 0 0), black border + textoklch(0.20 0 0).oklch(0.20 0 0), white "+"oklch(1 0 0).pnpm lintpasses.Closes #4454
🤖 Generated with Claude Code