-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Table: Remove unnecessary margin override in editor styles #57699
Conversation
Size Change: -16 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
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.
Thanks for the PR! Change LGTM and works correctly in testing. This should also fix #55409.
Thanks for the quick review! 🙇
It looks like that issue has a subtle difference as it's talking about the rule in
Unfortunately I think that one might be a little trickier to fix as there could be Classic themes out in the wild that expect that |
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 also 👍
Unfortunately I think that one might be a little trickier to fix as there could be Classic themes out in the wild that expect that 1em bottom rule to be applied
Agreed. I don't think that should block this PR landing.
Thanks folks! |
What?
Remove the Table block's unnecessary
margin: 0;
rule in its editor styles. Since this doesn't affect the styles on the site frontend, this shouldn't be a breaking change.Why?
The browser default
figure
element margins are already overridden via a lower specificity:where()
rule here:gutenberg/packages/block-library/src/common.scss
Line 161 in 9c5ce7e
The higher specificity rule in
.wp-block-table
had the unintended effect of overriding the low specificity layout rules (see: #47858 for when the layout rules were lowered in specificity). The result is that within the editor, the default layout block spacing is being overridden for the table block, when it shouldn't be.How?
Remove the Table block's unnecessary
margin: 0;
rule in its editor styles.Testing Instructions
margin: 0
rule prevents there being a space before the block within the editor, however on the site frontend that gap is present.Testing Instructions for Keyboard
Screenshots or screencast