Skip to content

Commit a414470

Browse files
dpmehtadpmehtat-hamanohimanshupathak95rinkalpagdar
authored
Latest Comments: Fix uneven padding issue causing mis-alignment (#77379)
* fix : reset padding with lowest specificity to avoid mis alignment * fix : improve padding reset by using padding-left * fix : removed styles which is no longer needed now Co-authored-by: dpmehta <mehtadev@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: rinkalpagdar <rinkalpagdar@git.wordpress.org> Co-authored-by: viralsampat-multidots <mdviralsampat@git.wordpress.org>
1 parent 55a86f5 commit a414470

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • packages/block-library/src/latest-comments

packages/block-library/src/latest-comments/style.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// Reset the browser's default `padding-inline-start: 40px` on `<ol>`.
2+
// Using `:where` keeps specificity at 0 so global styles, theme.json,
3+
// and inspector controls can override it without difficulty.
4+
:where(.wp-block-latest-comments) {
5+
padding-left: 0;
6+
}
7+
18
// Lower specificity - target list element.
29
ol.wp-block-latest-comments {
310
// Removes left spacing in Customizer Widgets screen.
@@ -26,13 +33,6 @@ ol.wp-block-latest-comments {
2633
}
2734
}
2835

29-
// Higher specificity - target list via wrapper.
30-
.wp-block-latest-comments .wp-block-latest-comments {
31-
// Remove left spacing. Higher specificity required to
32-
// override default wp-block layout styles in the Post/Site editor.
33-
padding-left: 0;
34-
}
35-
3636
.wp-block-latest-comments__comment {
3737
list-style: none;
3838
margin-bottom: 1em;

0 commit comments

Comments
 (0)