When editing a template part, the value of styles.spacing.padding in theme.json shouldn't be applied to the Site Editor wrapper #48098
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
Description
The Site Editor is adding top and bottom padding to the
.editor-styles-wrapper
element in the site editor. That makes sense in the case of templates because that's how they are rendered in the frontend as well. But for template parts, that shouldn't be necessary because they are rendered inside a template andstyles.spacing.padding
is not applied to them.Step-by-step reproduction instructions
useRootPaddingAwareAlignments
set to true intheme.json
, go to Appearance > Editor..editor-styles-wrapper
element has top and bottom padding (inherited fromstyles.spacing.padding
).Expected behavior: no padding should be applied to
.editor-styles-wrapper
when editing template parts. In the frontend, templates parts don't inherit the padding fromstyles.spacing.padding
, so in the editor they shouldn't either.While for some template parts this issue is not critical (it just makes the template part to appear lower than it should), it's more problematic when the template part occupies the entire height available, for example a header with a height of
100vh
or the Mini Cart template part in WC (see related issue: woocommerce/woocommerce#42482).Screenshots, screen recording, code snippet
No response
Environment info
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: