Repository navigation
Refactor collapsible colors into theme constants with day/night palettes - #106
Merged
Merged
Conversation
Co-authored-by: mdlew <47911000+mdlew@users.noreply.github.com>
Copilot
AI
changed the title
Refactor collapsible colors into theme constants
Refactor collapsible colors into theme constants with day/night palettes
Oct 8, 2026
mdlew
marked this pull request as ready for review
October 8, 2026 01:09
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The styling is consistently applied and all foreground/background combinations exceed WCAG contrast requirements.
0 open findings
What changed in this PR
Refactors collapsible styling into day/night theme colors for consistent readability.
Changes:
- Adds theme-specific collapsible background, hover, and text colors.
- Applies the palette to buttons, icons, and expanded content.
- Maintains accessible contrast across all states.
| File | Description |
|---|---|
src/ssr.ts |
Defines and applies day/night collapsible palettes. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
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.
The collapsible element used hard-coded colors (
#8A3B12,#59230B,white) that sat outside the text/accent theme system, and its readability depended on the page's time-of-day gradient. This PR moves those colors into explicit constants so the element matches the page palette and stays legible at all hours.src/ssr.ts, set alongsidetextColor/accentColor/focusColor:collapsibleBgcollapsibleHoverBgcollapsibleTexthourbranch (day is 07:00–17:59):#2B1D12, hover#4A3220, text#fff4cc(same cream as the night accent).#FFF1D6, hover#FFDFA3, text#2B1D12..collapsible.activeand:hover:after+/− icon.contentcontainerBgoverlay. By my estimate, text contrast is roughly 10–14:1 in both states, including hover. This has not been measured with a tool.The focus ring colors are unchanged and still contrast with the new backgrounds (white at night, black by day). Not checked in a browser.