fix: make demo gallery readable in dark mode on mobile#74
Merged
GeneralJerel merged 2 commits intomainfrom Mar 27, 2026
Merged
Conversation
Give the drawer an opaque background and increase card/chip contrast in dark mode so text is legible over the animated background. Closes #73
GeneralJerel
commented
Mar 27, 2026
Collaborator
Author
GeneralJerel
left a comment
There was a problem hiding this comment.
Review
Bug: Chip dark mode fix is ineffective
The .demo-gallery-chip CSS rule in globals.css:650-653 does not use !important:
:root.dark .demo-gallery-drawer .demo-gallery-chip {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.1);
}But the chip button in category-filter.tsx:23-31 sets background and border via inline style attributes, which always beat class-based CSS in specificity. The dark mode override will never take effect for chips.
The card fix works because it does use !important. The chip rule needs the same treatment.
Fix: Add !important to chip background and border-color.
Suggestion: Use existing design token instead of hardcoded color
The drawer background is set to #1a1a2e, but this value is already defined as --color-surface in the dark theme. Using var(--color-surface) stays DRY with the design tokens:
:root.dark .demo-gallery-drawer {
background: var(--color-surface) !important;
}| Finding | Severity |
|---|---|
Chip CSS missing !important — dark mode fix is a no-op |
Medium |
Hardcoded #1a1a2e duplicates --color-surface token |
Low |
Chip dark mode CSS was ineffective because inline styles on the button have higher specificity — add !important to match the card approach. Replace hardcoded #1a1a2e with var(--color-surface) to stay DRY.
Collaborator
Author
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.

Summary
#1a1a2e) in dark mode so the animated gradient doesn't bleed throughdemo-gallery-cardanddemo-gallery-chipCSS classes for targeted dark mode overridesTest plan
Closes #73