Cannot override default block styles via child theme's theme.json #59934
Labels
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
Needs Testing
Needs further testing to be confirmed.
[Type] Bug
An existing feature does not function as intended
Description
I am trying to change the default top spacing (margin) for the Embed block used in Gutenberg. I noticed that for some reason, the default setting is:
which I believe is defined in
/wp-includes/blocks/embed/theme.css
.It seems that it is not really overridable/replaceable via
theme.json
of a child theme.Step-by-step reproduction instructions
0 0 1em
.theme.json
to override the block spacing and add2rem
top margin:I would expect the styling to be overwritten (to reduce redundant code) or at least appear as a last entry in my CSS styling to ensure that it actually is applied.
Screenshots, screen recording, code snippet
In the screenshot below, the override is applied in line 96 of the HTML document, whereas the original styling appears in line 99.
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: