ui/Card: Remove redundant margin reset from Card.Title#77187
Conversation
The Text component now applies `margin: 0` by default (#76970), making Card.Title's own `.title { margin: 0 }` CSS class unnecessary. Made-with: Cursor
56b703b to
deb1de3
Compare
| return ( | ||
| <Text | ||
| variant="heading-lg" | ||
| render={ render ?? <div ref={ ref } { ...props } /> } |
There was a problem hiding this comment.
The forwrding of render and ref is being improved separately in #77160
- Add useDeprioritizedInitialFocus to Drawer.Popup so the close icon is not the first focused element when the drawer opens - Add data-wp-ui-drawer-close-icon attribute to Drawer.CloseIcon - Add container prop to Drawer.Popup and Dialog.Popup for cross-document portal rendering - Align Drawer.Action disabled/loading handling with Dialog.Action - Revert Card.Title changes (moved to #77187) - Extract Dialog improvements to separate PR (#77194) - Fix CHANGELOG placeholder PR number Made-with: Cursor
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -174 B (0%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in deb1de3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24184969624
|
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍
One thing that's occurring to me with a lot of your recent follow-ups: It's not clear which of these actually need CHANGELOG entries if the changes they're iterating on never actually made their way into a release. But fine to include all the granular notes if it becomes too much a burden to sift through what has or hasn't shipped.
Makes sense. As often, when things are "human-driven", there's a gray area that is up to interpretation. My personal preference would be to log everything, but to do so with a better system than manually writing a CHANGELOG (and fighting through conflicts and merge queues). More importantly, though, we should just be consistent with whatver approach we agree on |
What?
Split from #76690.
Remove the now-redundant
margin: 0override fromCard.Title, since theTextcomponent applies it by default after #76970.Why?
Textnow resets margins on all elements (#76970).Card.Titlehad its own.title { margin: 0 }CSS class andclsxwiring solely for this purpose — it's dead code now.How?
Details
.title { margin: 0 }rule fromcard/style.module.css.clsx/stylesimports andclassNameprop plumbing fromCard.Title(title.tsx).classNameis still forwarded to the underlying element via...propson the render element.Testing Instructions
npm run storybook:devCollapsibleCardstories as well (they useCard.Titleinternally).Use of AI Tools
Cursor + Claude Opus 4.6