release: v0.3.6 — fix table cells unreadable in forced-colors dark mode#175
Merged
Conversation
`.apg-table` sets `forced-color-adjust: none` so system-color substitution is opted out for the whole table. The cell rules only specified `background: Canvas`, leaving `color` to resolve to the base `var(--foreground)` — which becomes the light-mode oklch value (near-black) because the project's dark mode is class-based and the class isn't applied. Result: black text on black Canvas. - Explicitly set `color: CanvasText` on cells and rowheaders. - Override the cell hover to keep `background: Canvas` and indicate hover with a `Highlight` outline (avoids the var(--muted) value going near-white and clashing with CanvasText). - Give the sort button explicit `ButtonText` / `Highlight` hover for the same reason. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Release the table.css forced-colors dark mode fix as v0.3.6. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying apg-patterns-examples with
|
| Latest commit: |
8060a2b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7b04d12e.apg-patterns-examples.pages.dev |
| Branch Preview URL: | https://fix-table-forced-colors-dark.apg-patterns-examples.pages.dev |
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
forced-color-adjust: noneopt-out on.apg-tableblocked system-color substitution, leavingcolor: var(--foreground)resolved as the light-mode (near-black) oklch value on a blackCanvasbackground.color: CanvasTexton.apg-table-cell/.apg-table-rowheaderinside the forced-colors block.backgroundstaysCanvas(avoids clashing with the light-modevar(--muted)near-white value) and indicate hover with aHighlightoutline.ButtonTextcolor +Highlighthover for the same reason.forced-color-adjust: none, so browser auto-substitution handles dark forced-colors correctly there — no changes needed.Test plan
/patterns/table/{react,vue,svelte,astro}/with PlaywrightemulateMedia({ forcedColors: 'active', colorScheme: 'dark' }):CanvasText(white) text onCanvas(black) background — names/ages/cities readable.ButtonTextonButtonFace).Canvasbackground, gains a 2pxHighlightoutline.ButtonTextbase,Highlighton hover and focus./patterns/grid/,/patterns/data-grid/,/patterns/treegrid/in the same emulation — all text remains readable (auto-substitution).npm run test:e2e:pattern --pattern=tablepasses.npm run lintpasses.🤖 Generated with Claude Code