Repository navigation
Icon Block: Move default width rule to theme.json instead of block.json #75653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cd2708c
233faf4
c04d914
5b03b7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,13 @@ | |
|
|
||
| svg { | ||
| box-sizing: border-box; | ||
| width: 100%; | ||
| height: 100%; | ||
| fill: currentColor; | ||
| } | ||
| } | ||
|
|
||
| // Use :where() so these defaults have zero specificity and can be overridden | ||
| // by global styles, which target `.wp-block-icon svg` at higher specificity. | ||
| :where(.wp-block-icon) svg { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't have a good suggestion sorry. Setting the width of Image does this I believe
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm actually wondering if |
||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Looking at packages/components/src/placeholder/index.tsx I don't see any benefit
<Placeholder />has given the props passed to it.Kapture.2026-02-18.at.16.37.28.mp4
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my gut feeling is that the generalised
Placeholderis a good component for more complex use cases than this block. But I imagine we can also iterate on the placeholder state further in follow-ups if need be.