[wp-trac] [WordPress Trac] #55704: TT2: Allow customizing (top) padding through inspector controls

WordPress Trac noreply at wordpress.org
Mon May 9 20:04:42 UTC 2022


#55704: TT2: Allow customizing (top) padding through inspector controls
-----------------------------+-----------------------------
 Reporter:  Bernhard Reiter  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Themes           |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 The Twenty Twenty-Two (TT2) theme currently sets a fixed `padding-top` for
 the Post Comments block:
 https://github.com/WordPress/twentytwentytwo/blob/27054dbcb95f5d72cd943a0f3318c3ad97599f85/theme.json#L230-L236

 This makes sense in the context of where that block is used in the theme's
 templates; however, it limits the block's usefulness when the user wants
 to customize the theme by moving the block elsewhere, since it always
 comes with that hard-wired top padding.

 To remediate this, I'd suggest making the block's padding customizable
 through Inspector Controls (I believe Gutenberg has controls for block
 padding now?)

 Alternatively, the padding could be removed, and a spacer block could be
 used instead (with its height set accordingly). The downside of this
 approach is that we can't set its height to a relative value like `--wp--
 custom--spacing--small`; we'd have to assign a fixed value to it instead.
 Furthermore, this would basically revert
 https://github.com/WordPress/twentytwentytwo/pull/127.

 ---

 This ticket is based on
 [https://github.com/WordPress/gutenberg/issues/40826#issuecomment-1121372226
 this discussion] on a somewhat related GB issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55704>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list