Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Docs: clarify isDefault usage for registerBlockStyles() #11478
I think people are confusing "isDefault" as the default style variation applied when you insert the block (concept we don't have at the moment). That's not what the current "isDefault" refer to. The current "isDefault" is used to give a name to the style variation that doesn't add any custom className. (The no-style style variation).
@youknowriad I think I'm more confused now than when I started. Here's what I found after more testing.
It appears that when
Also, even if a style variation is selected in the block UI on insertion no CSS class is actually applied to the block wrapper element until a style variation option is manually clicked.
This feels counter intuitive to me. I'd expect the style variation CSS class to be applied whenever one is selected, either on block insertion or manual selection. This isn't currently the case.