Open carolinan opened 2 years ago
That's interesting. I guess Twenty Twenty Two composes headers this way to make things easier, but one of the problems is you end up with two nested HTML <header>
elements (technically invalid html).
The inner one shouldn't really be a <header>
element. It can be changed to a div
in the advanced settings, while still being a Header
area.
Another way to structure it would be to have Header (Dark, small)
and Header
both share a common general template part (which would contain the site logo, site title and navigation).
I don't know if that would solve your issue though, so maybe it needs more thought. I don't know if this menu should list all areas (even when there are multiple headers), or adjust to the selected template part like you suggest.
An alternative might be an option to clear customizations from the block settings menu (though this is getting quite busy):
For this particular theme it becomes difficult to "un nest" because of the color settings and because changes to the existing template parts, compared to adding new un nested parts, might break existing sites.
Description
In Twenty Twenty-Two, the default header uses a template part ("header") inside another header template part ("header, dark, small"). If you make a change to the inner template part, the "clear customization" option is not available in the template options modal at the top center of the page.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
WordPress 6.0 rc2, with and without current Gutenberg trunk. Beta tester plugin
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No