Skip to content

feat(Card): add size prop for compact and roomy padding - #475

Draft
IgorShevchik wants to merge 2 commits into
mainfrom
revive/card-size
Draft

feat(Card): add size prop for compact and roomy padding#475
IgorShevchik wants to merge 2 commits into
mainfrom
revive/card-size

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Frozen — draft on purpose. Opened to preserve work that was stranded on an old branch, not to land it. Nothing here is urgent; mark it ready when it is wanted.

Linked issue

Revives feat/card-size5e007fee, 2026-05-07. The original branch is untouched and can still be inspected.

Why this exists

main was re-rooted at b55bd3e7 (2026-07-10) and now holds 173 commits. The old feature branches share no merge base with it, so a PR opened straight from feat/card-size reports 1267 files changed, 25734 insertions, 84711 deletions — it reads as a PR that deletes most of the repository. git branch --merged is equally useless there for the same reason.

So the single authored commit is cherry-picked onto current main instead. The work is now reviewable as what it is: one feature, six files.

Type of change

  • New feature (a non-breaking change that adds functionality)

Description

Adds a size prop to Card — xs / sm / md / lg — controlling the padding of header, body and footer.

The padding is lifted out of those three slot bases into a size variant, with md reproducing the previous values exactly and size: 'md' added to defaultVariants. Existing usage is unaffected.

One conflict came up in the cherry-pick and is resolved in favour of current main: the May commit wrote tv({ extend: tv(theme), … }), which this repo has since changed to tv({ extend: theme, … }). Only the size: props.size line was taken from the old side.

Verification

Fourteen Card snapshots move, and they move only in class order: with the padding now supplied by the variant rather than the slot base, it lands after the variant classes instead of before. Checked mechanically rather than by eye — every changed line is class-set-equal to the line it replaces, and nothing outside class="…" differs. Rendering at the default size is identical.

Gate with CI=true: dev:prepare · lint · typecheck · test (7128 passed, 6 skipped, 310 files) · build · docs:generate (1262 routes).

Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Generated by Claude Code

claude added 2 commits August 24, 2026 04:22
Introduce a 'xs' | 'sm' | 'md' | 'lg' size variant that drives the
padding of the header, body and footer slots — useful for popovers and
densely packed dashboards where the default md spacing is too generous.
md is the default and matches the previous slot defaults.

https://claude.ai/code/session_013gYN6XWQ18LRJdDsatDpf7
The `size` variant lifts the padding out of the `header`/`body`/`footer` slot
bases, so for the default `md` it now lands after the variant classes instead of
before them. Fourteen snapshot lines move; every one differs only in the order of
classes inside `class="…"` — set-equal, and nothing else on the line changes.
Rendering at the default size is unchanged.
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