Use a container query for the metric strip, not a viewport one - #188
Merged
Conversation
My own fix in #187 reintroduced the bug it repaired. I added @media (min-width: 1500px) to restore the four-up strip on large screens, on the assumption that a wide viewport means a wide column. It does not: the column width is set by the scrolly grid. Measured on the live page at a 1728px viewport, that query matched while the column was still 562px, so the strip went back to four-up and clipped again -- exactly the failure mode, from the other side. The column width is a container property, so this has to be a container query. Two-up is now the floor, and four-up returns only when the column itself passes 700px. Verified against the live DOM: container queries supported, column 588px, columns resolve to 281px + 281px, scrollWidth 562 == clientWidth, no clipping.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
vahid-ahmadi
added a commit
that referenced
this pull request
Aug 26, 2026
* Bump the CSS cache key, and stop flex breaking inline links Two bugs, both found by measuring the live page rather than the source. ## The CSS fix from #188 was not reaching browsers style.css is cache-busted by a hand-written `?v=N` in each page's link tag, and it had sat at v=3 since #180. #187 and #188 both changed style.css without bumping it, so any browser that had already loaded `/style.css?v=3` kept serving the old file from cache and never saw the container-query fix -- confirmed on the live page: the deployed CSS contained the rule, the browser did not, and the strip stayed clipped until the stylesheet was reloaded under a different URL. Bumped to v=4 across 62 pages. Worth noting for future CSS changes: the version is manual, so it has to move whenever style.css does, or the fix ships to the CDN and stops there. ## An inline link was breaking mid-word `.vmet-notes-line` was `display: flex`, which makes EVERY child its own flex item -- including the inline <a> in the "gated" note. It shrank to 40px and broke "working paper" across three lines, splitting the word. Replaced with a hanging indent, which reproduces the same key/body look while leaving inline content in normal flow. Only two pages use this component and only one line in it carries a link, so the blast radius is small. Site suite 1564 passed; contract clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ * Bump the CSS version in the topic-page generator too The economy topic pages are emitted by economy/topics.py, which carries its own copy of the stylesheet link. Bumping the committed HTML without bumping the template made the two disagree, and the 'Economy topic pages match committed data' gate caught it. Template updated and all 11 pages regenerated. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
My own fix in #187 reintroduced the bug it repaired.
I added
@media (min-width: 1500px)to restore the four-up strip on large screens, assuming a wide viewport means a wide column. It doesn't — the column width is set by the scrolly grid. Measured on the live page at a 1728px viewport, that query matched while the column was still 562px, so the strip went back to four-up and clipped again. Same failure mode as the original, from the other side.The column width is a container property, so this has to be a container query. Two-up is the floor; four-up returns only when the column itself passes 700px.
Verified against the live DOM
Site suite 1564 passed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ