fix(island): the pinned band's ground is pinned with its ink - #1214
Merged
Conversation
A custom property built out of another is substituted where it is declared, not where it is read. `--band-ground` is built from `--color-pit` on `.island`, above `.band-swipe--pinned`, so inside the pinned band the ink flipped to chalk while the wash kept the light theme's pale: white text on a pale ground, reachable today on the esports pages whenever a light-theme visitor opens a slice. The band rebuilds it from the pinned pit, and the block says that anything derived from those seven properties belongs there for the same reason. `--accent-ink` on the board page is built from `--color-chalk` too. The board band is not pinned — only the esports swipe applies that class — so it resolves against the viewer and is correct today. The comment beside it says what to do if that changes, since the failure is silent. Closes #984
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.
Closes #984.
Why
.band-swipe--pinnedpins the dark treatment inside a swipeable band, so a photograph is never filtered by a wash that follows the viewer's theme. It overrides seven properties — ground, pit, surface, raised, hairline, chalk, ash.A custom property built out of another is substituted where it is declared, not where it is read.
--band-groundis built from--color-piton.island, above the pinned band:So in the light theme the ink inside the band flipped to chalk while the wash it sits on kept the viewer's pale. White text on a pale ground, live on the esports pages whenever a light-theme visitor opens a slice.
How
The pinned block rebuilds
--band-groundfrom the pinned pit, and says why: anything in the island layer derived from those seven properties belongs in that block for the same reason.I checked what else derives from that family rather than assuming the ticket's list was complete. Two properties do:
--band-ground, and--accent-inkon the board page.The one I did not change
--accent-inkis built from--accentand--color-chalk. The board band is not pinned —grepfindsband-swipe--pinnedapplied only bySeasonSwipe— so it resolves against the viewer's theme and is correct today. Changing it now would be fixing a bug that does not exist.What it gets instead is a comment beside it saying what to do if that band is ever pinned, because the failure is silent: the text simply becomes hard to read, and nothing errors. #978 found this exact shape by extending the pinning to the board band, which is how the bug was noticed at all.
Verification
Test first, and it fails for the stated reason before the fix:
The new e2e case reads
--band-groundoff the pinned swipe and off the island in the light theme and asserts they differ — the pinned one is built from the pinned pit, so it cannot be what the light page computed for itself.esports-island,esports-band-behaviourandboardson chromium — 62 passed, 9 skipped.yarn vitest run— 189 files, 1627 tests.typecheckandeslintclean.Diff breakdown —
█added░removed, scaled to the largest row.