Global style Utility Classes #37494
Labels
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Enhancement
A suggestion for improvement.
Instance of a block provides Advanced: add class that can be used with Simple CSS to add a utility class but that only affects the front-end not the site editor.
Utility classes have become very important to efficiently create professional websites. But they are created with CSS which only affects the front-end. If we could add custom Utility Classes as Global Styles (theme.json) and associate them to instances of a block, then they would show up in the site editor as well, preserving the same styling on front/back-end.
What is your proposed solution?
In the block settings, under Advanced, just below Add Custom Class, add another field to Add Custom Style. The code would have to be added to the theme.json file with the same name, to associate the style with any block instance that has the matching Style name added.
The text was updated successfully, but these errors were encountered: