feat(Card): add size prop for compact and roomy padding - #475
Draft
IgorShevchik wants to merge 2 commits into
Draft
feat(Card): add size prop for compact and roomy padding#475IgorShevchik wants to merge 2 commits into
IgorShevchik wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Revives
feat/card-size—5e007fee, 2026-05-07. The original branch is untouched and can still be inspected.Why this exists
mainwas re-rooted atb55bd3e7(2026-07-10) and now holds 173 commits. The old feature branches share no merge base with it, so a PR opened straight fromfeat/card-sizereports1267 files changed, 25734 insertions, 84711 deletions— it reads as a PR that deletes most of the repository.git branch --mergedis equally useless there for the same reason.So the single authored commit is cherry-picked onto current
maininstead. The work is now reviewable as what it is: one feature, six files.Type of change
Description
Adds a
sizeprop to Card —xs/sm/md/lg— controlling the padding ofheader,bodyandfooter.The padding is lifted out of those three slot bases into a
sizevariant, withmdreproducing the previous values exactly andsize: 'md'added todefaultVariants. Existing usage is unaffected.One conflict came up in the cherry-pick and is resolved in favour of current
main: the May commit wrotetv({ extend: tv(theme), … }), which this repo has since changed totv({ extend: theme, … }). Only thesize: props.sizeline 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
Generated by Claude Code