Repository navigation
Lift dark-mode Talks heading so the gradient stays readable - #7
Merged
Merged
Conversation
Copy comphy-design-system PR #3 tokens.css so the four hero-gradient stops lift in dark mode and .hero-title keeps a solid fallback. Co-authored-by: Vatsal Sanjay | CoMPhy Lab <vatsal.sanjay@comphy-lab.org>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches
Comment |
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
In dark mode the gradient Talks heading on comphy-lab.org/talks was barely readable.
h1.hero-titlestill clipped the light-theme four-stop brand gradient (#ff6b6b→#68236d→#4c6ef5→#2d1b69) onto the real page paper (#1b1814from the shared header shell), so the purple and indigo ends disappeared. Light mode already looks right and is unchanged (index 1440 and 390 screenshots are byte-identical before/after).This copies comphy-lab/comphy-design-system#3 (
tokens.cssat0d70847) intosite/vendor/ds/tokens.css. The vendored file is byte-identical to that head. Runtime HTML?v=fingerprints were refreshed so the new CSS is what pages load.Individual talk pages use
h1.talk-head__title(solid--fg-strong), not the hero gradient. No other gradient titles exist on those pages.Changes
Inside
:root[data-theme="dark"]:.hero-titledefault colour isvar(--hero-grad-2).background-clip: text, and-webkit-text-fill-color: transparentapply only inside@supports ((-webkit-background-clip: text) or (background-clip: text)).--hero-grad-*values are unchanged.Contrast on the real dark background
Live computed
--c-paper/bodybackground in dark mode is#1b1814(rgb(27, 24, 20)), becausesite/vendor/comphy-lab/header.csslifts the DS token#12100dto match comphy-lab.org. WCAG 2 relative luminance. Every sampled point of the 90deg sRGB interpolation (stops at 0%, 45%, 55%, 100%) must be ≥4.5:1.#1b1814)#1b1814)--hero-grad-1#ff6b6b6.373#ff8a8a7.794--hero-grad-2#68236d1.726 FAIL#d99adc8.090--hero-grad-3#4c6ef54.090 FAIL#8aa0ff7.203--hero-grad-4#2d1b691.240 FAIL#9b8cff6.391#2d1b69(175/201 points fail)#9b8cff(0 fail)Same stops vs the unused DS paper token
#12100d: before 6.844 / 1.854 / 4.392 / 1.332; after 8.370 / 8.688 / 7.736 / 6.864.Live computed tokens after the change: light
#ff6b6b #68236d #4c6ef5 #2d1b69on#f3efe8; dark#ff8a8a #d99adc #8aa0ff #9b8cffon#1b1814.Testing
site/withpython3 -m http.server -d site 8000.singular-bursting-bubbles, light and dark, 1440 and 390, before and after.cd tools && uv run pytest -q -m "not slow and not export"— 123 passed, 24 deselected.python -m talks_build refresh-assets --check— clean.Index — dark
Desktop 1440. The indigo end of Talks disappears into the paper; after it holds.
Mobile 390.
Index — light (pixel-identical)
Desktop 1440.
Mobile 390.
Talk page — no gradient title
h1.talk-head__titlestays solid--fg-strong. Dark and light, desktop 1440 and mobile 390.