-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix misaligned layout control icons #47089
Conversation
Size Change: +1.28 kB (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 40f1157. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3936850929
|
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.
I noted a minor detail, but in general I think this is a reasonable workaround 👍
It's this style that causes it
Yes, the overscoped style in the block inspector is unfortunate, but it isn't going away any time soon. There are talks of a better alternative (#43423), but even so I think that style will take a long time to phase out. Just adding some context for posterity 🙂
@@ -10,6 +10,10 @@ | |||
margin: auto 0 $grid-unit-05 $grid-unit-10; | |||
} | |||
} | |||
|
|||
.components-input-control { |
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.
For robustness, I would recommend passing your own classNames to the UnitControls (.block-editor-hooks__something
), or scoping it to .components-unit-control
at the very least since it isn't a given that UnitControls will always have a .components-input-control
class under the hood.
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.
🚢
What?
Apply
auto
margin-bottom to vertically center the layout controls again. Closes #47088.Why?
The icons are no longer where they should be. Look fine in WordPress core, but not in Gutenberg.
How?
Minor style change.
Testing Instructions
Screenshots or screencast
Before:
After: