Skip to content
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

Try: Mitigate CSS inheritance from wp-block auto margins #28878

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,17 @@
}
}

// Extra specificity needed to override default element margins like lists (ul).
.block-editor-block-list__layout .wp-block {
.wp-block {
// The following margin-CSS is editor-only, it is meant to center all blocks, when combined with a max-width, in a column.
margin-left: auto;
margin-right: auto;
}

.wp-block {
// Prevent inheritance.
.wp-block {
margin-left: initial;
margin-right: initial;
}

// Alignments.
&[data-align="left"],
&[data-align="right"] {
Expand Down