Skip to content

fix(components): keep painters inside the box the layout assigned - #134

Merged
LeadcodeDev merged 1 commit into
mainfrom
fix/painters-inside-box
Aug 2, 2026
Merged

fix(components): keep painters inside the box the layout assigned#134
LeadcodeDev merged 1 commit into
mainfrom
fix/painters-inside-box

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #127. Part of the chantier #123.

Independent of the other six workstreams: disjoint file set, compiles and tests green on its own against main. Mergeable in any order.

Full rationale, measurements and evidence are in the commit message and in #127.

Several painters drew well outside the box they were given, which in a
panel-based style means drawing on top of the next sibling or outside the card
entirely. Measured against a 560x300 card with 24px padding: stat painted 120px
tall in a 48px box, timeline started 33px left of its box and 9px outside the
card, caption placed its box above the card top, switch, slider and countdown
each ran past their own edges.

Each now either draws within its box or reports the size it genuinely needs.
stat shrinks to fit any assigned height rather than assuming one — the 48px it
was measured against turned out to be a height the audit set deliberately, not
a natural default, so pinning the fix to that number would have been wrong.

badge and kbd stretched to the full card width because they have intrinsic
measures but auto CSS width, so align-items: stretch won: a keycap rendered as
a full-width slab. Both now keep their natural width inside a card.

divider was investigated and left alone. Its reported 8px overhang traces to an
explicit length that exceeded a smaller test card, which is correct behaviour.

Closes #127
@LeadcodeDev
LeadcodeDev merged commit 4a519ba into main Aug 2, 2026
3 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.

fix(components): keep painters inside the box the layout assigned

1 participant