A method for adding block variants #9104
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Status] Duplicate
Used to indicate that a current issue matches an existing one and can be closed
I would like to add block variants to my theme, essentially adding classes to the block container. I already add css classes to the theme and they can be styled in the editor by adding the custom class in the advanced block settings, but if there was an easy way to add additional variants then it would improve discoverability for users.
Ideally this would be a simple php request added via add_theme_support. Something along the lines of:
I guess a javascript option would be possible also, but using add_theme_support seems like a clean and elegant 'WordPressy' way to do it. But any method would be great.
The text was updated successfully, but these errors were encountered: