[wp-trac] [WordPress Trac] #60197: Twenty Fifteen: List block padding with a background color

WordPress Trac noreply at wordpress.org
Fri Jul 19 18:22:17 UTC 2024


#60197: Twenty Fifteen: List block padding with a background color
-----------------------------------+------------------------------
 Reporter:  viralsampat            |       Owner:  (none)
     Type:  defect (bug)           |      Status:  assigned
 Priority:  low                    |   Milestone:  Awaiting Review
Component:  Bundled Theme          |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  css
-----------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  has-patch needs-testing 2nd-opinion => has-patch 2nd-opinion
 * priority:  normal => low


Comment:

 The padding value for lists with a background comes from `block-library`
 styles, not the theme. If that amount ever changes, it would be inaccurate
 (but likely better than zero).

 Maybe any change on this ticket should not affect the `iframe` editor.
 [attachment:"60197.nonframed.patch"] targets only the List block (ordered
 or unordered), only in the non-framed editor.
 {{{
 div.editor-styles-wrapper .wp-block-list:where(.has-background) {
         padding: 1.25em 2.375em;
 }
 }}}

 Another selector could do the same for the List and Latest Posts blocks:
 {{{
 div.editor-styles-wrapper .has-background:where(.wp-block-list, .wp-block-
 latest-posts)
 }}}

 ----

 [attachment:"60197.2.patch"] is simpler. It could also correct the left
 padding for a Latest Posts block with a background, whether or not the
 editor is framed, but the
 [https://github.com/WordPress/gutenberg/blob/dc93da08a38af14aef07906c63ec11a599d74582/packages
 /block-library/src/latest-posts/editor.scss#L26-L27 block-library styles]
 could use `:not(.has-background)` for any theme.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60197#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list