Repository navigation
feat(card): add padding="none" to Card.Content for edge-to-edge content - #576
Merged
Merged
Conversation
…nt (#1390) Tables, DataTables and divided lists in a card needed a `px-0!` class override. The prop removes the padding, carries the card's corner radius to a direct Table/DataTable child so row backgrounds stay inside the rounded corners, and drops a nested DataTable's own border. Cells keep their intrinsic 24px inset, so the first column lines up with the title. Updates the document-detail and styling-theming docs that taught the workaround, and adds a Card showcase page to the vite example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code Metrics Report
Details | | main (396a0c7) | #576 (4ad5e7f) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 87.6% | 87.6% | +0.0% |
| Files | 206 | 206 | 0 |
| Lines | 6089 | 6090 | +1 |
+ | Covered | 5334 | 5335 | +1 |
+ | Test Execution Time | 2m20s | 2m15s | -5s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
interacsean
marked this pull request as ready for review
October 6, 2026 05:25
IzumiSy
approved these changes
Oct 6, 2026
…content # Conflicts: # docs-manifest.json
Contributor
Author
|
/review |
Contributor
|
✅ Code Review completed successfully! Code review complete for PR #576 — no High/Medium issues found in the changed package code under packages/**, so no inline review comments were needed.
|
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.
Issue
https://github.com/tailor-inc/platform-planning/issues/1390 (source: https://github.com/tailor-professional-service/knowledge/discussions/221)
What
Card.Contentgainspadding?: "default" | "none". With"none":Table,DataTableor divided list meets the card's border.first:/last:rounded-[inherit]) and handed to a directTable/DataTablechild. Their existing overflow clipping keeps row hover and pinned-cell backgrounds inside the rounded corners.DataTabledrops its own border, so there is no box-in-a-box.Table.Head/Table.Cellalready carryfirst:pl-6/last:pr-6, so the first column lines up with the card title (measured: both at 24px).Why
Consumers were zeroing the padding with
className="px-0!"(or droppingCard.Content). The intent couldn't be read from the API, and a plainpx-0silently loses to AppShell'sastw:px-6in the cascade.Reviewer notes
overflowonCard.Contenton purpose. Content only carries the radius. Withoverflow-hiddenthere, AppShell's rule would beat a consumer'soverflow-y-autoand break the scrollable-list case.px-0!kept the 24px bottom padding.padding="none"removes it, so the table ends on the card's border.DataTable.Footerispx-4and the DataTable toolbar isp-2, so footer and toolbar text sit 8px left of the card title. Standalone DataTables already have the same 8px offset from their cells. Best fixed in DataTable itself as a follow-up, rather than overridden only inside cards.Card.Contentnow rendersdata-padding. Consumer DOM snapshots will pick that attribute up.document-detailpage pattern andstyling-themingtaughtpx-0!. All four call sites and the Constraint now use the prop.Try it
Vite example → Showcase → Card Demo (
/showcase/card). A Basics section shows the common compositions: header + content, header only, content only, custom header content, a divided header, and padded text followed by a flush list. The Edge-to-edge section shows a DataTable with a pagination footer, a DataTable ending on a data row (right-pinned column), no header (top corners), a plainTable, and a scrollable divided list.Checks
type-check,lint, tests (1827),check-dts,docs:checkall pass. Changeset: minor.🤖 Generated with Claude Code