DefaultStylePicker and block.json isDefault style strange behaviour. Bug or feature? #52855
Unanswered
realthemes
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is this how it should work?
I made a custom block with create-block, just a simple examle block that return paragraph, then in block.json I add fields:
But when I add my block on page, the default classname
is-style-primary
didn't applied until I press Default button in Editor Sidebar, in its turn, Default button looks like it already pressed and if you click it, you can't unpress it.It turns out that Default styles need to be duplicated – one set of styles for the initial block added to the page, the same styles for 'isDefault,' and a third set of styles for 'Secondary.'
What you think it's bug or feature?
Beta Was this translation helpful? Give feedback.
All reactions