Repository navigation
fix(web): Curves page captions wrap (scoped paragraph rule) - #6218
springfall2008 wants to merge 1 commit into
Conversation
… 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>
springfall2008
left a comment
There was a problem hiding this comment.
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.
#6217 set
white-space: normalon the Curves page container, but the shared header'sp { 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 computewhite-space: normal, are 960px wide and don't overflow.web_curves_chartnow checks for the scoped rule;web_ifand pre-commit pass.🤖 Generated with Claude Code