Skip to content

Commit

Permalink
Fix to remove default indent from Latest Posts and Latest Comments bl…
Browse files Browse the repository at this point in the history
…ock in various editors (#32983)

* Remove default left spacing on Latest Posts in all Editors

* Remove spacing consistently across Post/Site, Widgets and Widgets Customizer editors

* Fix indentation of Comments block in Site Editor
  • Loading branch information
getdave authored and youknowriad committed Jun 28, 2021
1 parent fa60650 commit ebf0be9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/block-library/src/latest-comments/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
// Lower specificity - target list element.
ol.wp-block-latest-comments {
// Removes left spacing in Customizer Widgets screen.
// Due to low specificity this will be safely overriden
// by default wp-block layout styles in the Post/Site editor
margin-left: 0;
}

// Higher specificity - target list via wrapper.
.wp-block-latest-comments .wp-block-latest-comments {
// Remove left spacing. Higher specificity required to
// override default wp-block layout styles in the Post/Site editor.
padding-left: 0;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/latest-posts/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
}
&.wp-block-latest-posts__list {
list-style: none;
padding-left: 0;

li {
clear: both;
}
}

&.is-grid {
display: flex;
flex-wrap: wrap;
Expand Down

0 comments on commit ebf0be9

Please sign in to comment.