WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
406 stars 91 forks source link

Adjust padding to better support theme.json and outer padding #310

Closed richtabor closed 2 years ago

richtabor commented 2 years ago

Description Remove forced padding values on patterns, that are not allowing settings.custom.spacing.outer to function properly.

Screenshots Header Large Dark, with increased outer spacing (with settings.custom.spacing.outer set to 4rem for illustrative purposes):

CleanShot 2021-12-20 at 18 02 24@2x

header-small-dark (with settings.custom.spacing.outer set to 4rem for illustrative purposes):

CleanShot 2021-12-20 at 18 11 18@2x

Testing Instructions

Provide steps for testing

  1. Modify the theme.json value for settings.custom.spacing.outer to anything else (4rem for example)
  2. See how the contents within patterns appropriately adjust to the new value
richtabor commented 2 years ago

Here are more headers (showing how a change in outer is reflected properly):

CleanShot 2021-12-20 at 18 23 59@2x
richtabor commented 2 years ago

These examples show what happens to the various patterns' padding when a value other than var(--wp--custom--spacing--small, 1.25rem) is set as settings.custom.spacing.outer.

Here's the current PR — which does not actually change the value, but makes the patterns adapt to when there is a change:

CleanShot 2021-12-20 at 19 27 05@2x CleanShot 2021-12-20 at 19 27 34@2x