-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request For Comment: Content Widths and Child Themes #73
Comments
@douglas-johnson This is a great write-up, thanks for it. I generally lean towards the solution that would provide the best, soonest benefit to our users, the editorial team in this case; so reflexively, I gravitate towards using the wp customizer to get the custom widths set for use ASAP. On further contemplation though, despite the initial glut of work to update all our WP site themes to use Theme.json(s), updating to the newer feature which is likely to have support improved and expanded functionality added over the next several WP versions seems best. Especially when one considers making any additional site customization in future (this is assuming full coverage for So, I am in support of migrating to |
Thanks @richdacuban ! |
Additional context for child themes: WordPress/gutenberg#25612 |
Problem To Solve
We would like the default content width and wide content widths to be different on Creepy Catalog.
So far those two values ( 32rem and 64rem respectively ) have been set in the parent theme and reused as LESS variables in the child themes.
We believe slightly wider default paragraphs that allow for more words per line would be a better reading experience on Creepy Catalog. In discussion with editorial and sales, it was also expressed that we would use the wide width for more images if the difference in size wasn't as large. A goal might be: make sure its possible to see the whole image and fit a caption or heading on screen at the same time on landscape tablets or laptops.
On the otherhand, we do not want to change these values for Shop Catalog where we need the wide width to be large for displaying a grid of products.
So, how could we make it possible for child themes to either inherit the parent theme widths, or change them for their specific needs?
Context Regarding Theme Settings
In WordPress 5.8, the theme.json file was introduced to partially replace the use of
add_theme_supports
for block editor settings. Adding theme.json is a step toward Full Site Editing which is a long term goal of WordPress where the block editor can used to edit... the full site.https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/
How It's Related
There is a "layout" setting in theme.json that lets you set
contentWidth
andwideWidth
. Those sizes are applied to the block editor. It is up to the theme developer to apply those values on the front-end.https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#settings
Issues With That
__inter-container
element which we rely on in some of our CSS.__experimentalLayout
features. This allows authors to change the content and wide width settings within group blocks. That's all well and good except the related CSS forces a centered layout.0.6.0-beta1
tag: https://github.com/thoughtis/cata/blob/0.6.0-beta1/theme.jsonReferences
Options
Option A - Use Theme.json
*__inner-container
block in groups.Pros
Cons
Option B - Use Customizer
Pros
Cons
The text was updated successfully, but these errors were encountered: