Skip to content

fix(templates): start the spacing compaction where the layout changes - #32

Merged
scheemunai merged 1 commit into
mainfrom
fix/template-breakpoint-cliffs
Sep 5, 2026
Merged

fix(templates): start the spacing compaction where the layout changes#32
scheemunai merged 1 commit into
mainfrom
fix/template-breakpoint-cliffs

Conversation

@scheemunai

Copy link
Copy Markdown
Owner

A cliff is a layout defect at any cap

Three templates change height by hundreds of pixels across one pixel of viewport. The compaction ended at 30/34rem and the wider layout did not begin until 44/62rem — between the two, the document ran full desktop spacing inside a still-narrow single column.

main this branch
report @481 3,337 2,780
research-brief @552 3,286 2,622
postmortem @545 2,958 2,464

This does not depend on the threshold, which is why it is split out of #30.

No spacing value changes

The existing compaction block is split: the spacing half now starts at the width where the layout actually becomes one column; the type half stays where the measure needs it. Same declarations, earlier start.

One thing worth reading in the diff

Moved declarations are appended at the end of the target block, not the start. Placing them at the start silently handed three selectors to a later rule in the same block and cost postmortem 40px at 320 — a fix that made a width worse while the headline number improved. Caught by sweeping rather than by reading, and by dupselscan flagging the dead declarations the move created.

Scope

  • Rendered content is byte-identical to main for all seven templates. Every change is CSS.
  • No prose removed to pay for the added bytes.
  • No gutter or spacing work bought against the sub-390 band. That stays frozen — and these three consequently still peak above the cap at 320 (3,223 / 3,107 / 2,961). That is the part that genuinely depends on the number being re-derived.
  • All seven within the 18,432 byte cap.
  • dupselscan clean across all 19 templates.

🤖 Generated with Claude Code

Three templates change height by hundreds of pixels across one pixel of
viewport. The compaction ended at 30/34rem and the wider layout did not begin
until 44/62rem, so between the two the document ran full desktop spacing inside
a still-narrow single column.

  report          3,337 @481  ->  2,780 @481
  research-brief  3,286 @552  ->  2,622 @545
  postmortem      2,958 @545  ->  2,464 @545

A cliff is a layout defect at any cap, which is why this is separated from the
height work held against the 2,900 re-derivation.

No spacing value changes. The existing compaction block is split: the spacing
half now starts at the width where the layout actually becomes one column, the
type half stays where the measure needs it. Moved declarations are appended at
the end of the target block so they still win where they already won -- placing
them at the start silently handed three selectors to a later rule and cost
postmortem 40px at 320 before it was caught.

Rendered content is byte-identical to main for all seven templates. Every
change here is CSS, no prose was removed to pay for it, and no gutter or
spacing work is bought against the sub-390 band -- that stays frozen, and these
three still peak above the cap at 320 as a result. That is the part that
genuinely depends on the number.

Co-Authored-By: CRHQ <noreply@crhq.ai>
@scheemunai
scheemunai merged commit 602c20a into main Sep 5, 2026
5 checks passed
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.

2 participants