Make WordPress Core

Opened 17 months ago

Last modified 13 days ago

#55704 new defect (bug)

Twenty Twenty-Two: Allow customizing (top) padding through inspector controls

Reported by: bernhard-reiter's profile Bernhard Reiter Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

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 this discussion on a somewhat related GB issue.

Change History (1)

#1 @SergeyBiryukov
13 days ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from TT2: Allow customizing (top) padding through inspector controls to Twenty Twenty-Two: Allow customizing (top) padding through inspector controls
Note: See TracTickets for help on using tickets.