Skip to content

fix(web): Curves page captions wrap (scoped paragraph rule) - #6218

Open
springfall2008 wants to merge 1 commit into
mainfrom
fix/curves-page-wrap-p
Open

springfall2008 wants to merge 1 commit into
mainfrom
fix/curves-page-wrap-p

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

#6217 set white-space: normal on the Curves page container, but the shared header's p { white-space: nowrap } targets the paragraphs themselves, so the container's value was never inherited and the captions still ran off the page.

This adds a scoped .curves-page p { white-space: normal; } rule, the same fix the Kraken key page uses. I rendered the page with the header's nowrap rule present and checked it in Chrome: the paragraphs compute white-space: normal, are 960px wide and don't overflow. web_curves_chart now checks for the scoped rule; web_if and pre-commit pass.

🤖 Generated with Claude Code

… paragraphs

#6217 set white-space: normal on the page's container, but the shared header's p { white-space: nowrap } targets the
paragraphs themselves, so nothing was inherited and the captions still ran off the page. A scoped
.curves-page p { white-space: normal; } rule overrides it, as the Kraken key page does. Checked in Chrome with the
header rule present: computed white-space normal, no overflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the BOT_REVIEW Trigger an autotriage label Nov 15, 2026

@springfall2008 springfall2008 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated comment from the triage bot.

Reviewed head 60455ea4. No findings: 0 inline, 0 in the body.

What I checked. The scoped rule .curves-page p { white-space: normal; } (web.py:4035) outranks the shared header's p { white-space: nowrap } (web_helper.py:8477) on specificity, 0,1,1 against 0,0,1, so it wins whatever order the two stylesheets are parsed in; the header's is emitted first in <head> in any case. Both captions the fix is for sit inside the div that closes at web.py:4135 - the prose paragraph at web.py:4062 and the "No ... evidence yet" note at web.py:4117 - so curves-page covers them. Dropping the div's inline white-space:normal loses nothing: nothing inside it sets or depends on inheriting that value (the table, th/td and the h2/h3 all default to normal, and no other rule targets them). get_curves_chart has exactly one caller, get_chart("Curves"), so the new <style> element only reaches this page. The test change is meaningful: against the pre-PR file neither <div class='curves-page' nor the scoped rule is present, so the assertion fails with the fix reverted. The shape matches the three existing overrides (.kraken-key p, .annual-* p, #chat-page p).

Not verified here: an actual browser render - the cascade conclusion is from reading the two stylesheets and the markup.

@springfall2008 springfall2008 removed the BOT_REVIEW Trigger an autotriage label Nov 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant