Styles for different templates #51384
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
My use case is that I want H2 to look different on posts and pages. With a style.css-file and classic theme editing this a very simple thing to do. But there's no option to do this with a theme.json-file. I can style blocks, add block styles and block variations, but I can't connect the styles to specific templates. I tried to search trough all documentation and open issues, and I couldn't find a solution nor this exact issue. #44997 is the closest one, but it's for the editor, not theme.json.
While my case is quite simple (h2 only), there's tons of different use cases, like for custom post types and different kinds of page templates (FAQ, landing page, etc). Post titles may look different, you may want different content widths for different templates, etc.
This should be handled by at theme level IMO, so it should be in theme.json.
What is your proposed solution?
Same markup as the one proposed in #44126 , but with Templates, not only template parts. So:
The text was updated successfully, but these errors were encountered: