Skip to content

Commit

Permalink
Center blocks by default
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 17, 2020
1 parent 911a5f4 commit 828b44c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.block-editor-block-list__block {
margin-left: auto;
margin-right: auto;
}

.block-editor-block-list__layout .block-editor-block-list__block { // Needs specificity to override inherited styles.
// While block is being dragged, dim the slot dragged from, and hide some UI.
&.is-dragging {
Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/image/editor.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
.wp-block-image {
position: relative;

// This resets the intrinsic margin on the figure in non-floated, wide, and full-wide alignments.
margin-left: 0;
margin-right: 0;

&.is-transient img {
opacity: 0.3;
}
Expand Down
6 changes: 0 additions & 6 deletions packages/edit-post/src/components/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@
height: 0;
}

// The base width of blocks
.edit-post-visual-editor .block-editor-block-list__block {
margin-left: auto;
margin-right: auto;
}

// Ideally this wrapper div is not needed but if we waant to match the positionning of blocks
// .block-editor-block-list__layout and block-editor-block-list__block
// We need to have two DOM elements.
Expand Down

0 comments on commit 828b44c

Please sign in to comment.