Skip to content

Global Margin is not applied on the front end for the separator block #47059

Open

Description

Description

When setting a margin for the separator block in global styles the margin is not output on the front end. It all looks fine in the site and page editor however no dice on the front end.

The global style appears to be getting overridden by this default style:

body .is-layout-constrained > * + * {
margin-block-start: 1.5rem;
margin-block-end: 0;
}

Applying the margin directly in the page editor works since the style is applied with a higher specificity than the above style.

Step-by-step reproduction instructions

Add a separator
Set a margin via the global style editor
Add a separator to a page

Screenshots, screen recording, code snippet

No response

Environment info

Wordpress 6.1.1
Tried with and without Gutenberg 14.9.1
Twenty Twenty-Three theme
OSX Safari, Chrome and Firefox all the same

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] SeparatorAffects the Separator BlockAffects the Separator Block[Feature] LayoutLayout block support, its UI controls, and style output.Layout block support, its UI controls, and style output.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions