WordPress / twentytwentytwo

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

Using CSS variables for wp-container max-width #303

Closed larsadolfsen closed 2 years ago

larsadolfsen commented 2 years ago

I suggest using CSS variables for max-width on .wp-containers when Change Alignment is set to None and Wide Width

This would make it much easier to change the width of templates overall, but also for custom styling of elements..

kjellr commented 2 years ago

👋 Hey there. At some point, users should be able to edit those values directly in the Global Styles panel, which should make them far easier to edit.

In general though, the styles that control the layout are defined in theme.json and then generated by Gutenberg, so this would have to be done on the Gutenberg level. If you'd like to open an issue to suggest the use of CSS variables for this, feel free to open a Gutenberg issue here:

https://github.com/WordPress/gutenberg/issues/new?assignees=&labels=&template=Feature_request.md

kjellr commented 2 years ago

Now that we're nearing release, I'm going to close this issue. If anyone has further thoughts to share on this topic, feel free to open up a new issue on Trac or in the Gutenberg repository.