You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the problem is Create Block Theme is trying to write the styles to your theme.json file and it's not supported yet, so what happens in nothing gets written, but Create Block Theme clears all db edits expecting the edits were saved to your theme.json file.
NOTE! If you are the Gutenberg plugin active, then it does work and your custom style variations are saved to theme.json.
Use Twenty Twenty Four theme and WP 6.6.1.
Created a Block Style Variation, whether created by JS, PHP, or Section Style, the same issue occurs. I used Section Style for this demo, since it's the fastest, so let's stick with that for recreating it.
Here's the current style it set in my section style for a new custom block style for a button called "Fancy Button". It has black bg, white text.
Now using the Site Editor "Styles" editor, make some changes. I made the bg orange.
Save changes with Create Block Theme, ensuring "Save Style Changes" is selected.
Boom! All your styles are gone, the original block variation styles are back as they are not saved to your theme.json and the database changes are removed (the latter is supposed to happen since that's what Create Block Theme is meant to do).
I believe the problem is Create Block Theme is trying to write the styles to your
theme.json
file and it's not supported yet, so what happens in nothing gets written, but Create Block Theme clears all db edits expecting the edits were saved to your theme.json file.NOTE! If you are the Gutenberg plugin active, then it does work and your custom style variations are saved to theme.json.
Use Twenty Twenty Four theme and WP 6.6.1.
Created a Block Style Variation, whether created by JS, PHP, or Section Style, the same issue occurs. I used Section Style for this demo, since it's the fastest, so let's stick with that for recreating it.
Here's the current style it set in my section style for a new custom block style for a button called "Fancy Button". It has black bg, white text.
Now using the Site Editor "Styles" editor, make some changes. I made the bg orange.
Save changes with Create Block Theme, ensuring "Save Style Changes" is selected.
Boom! All your styles are gone, the original block variation styles are back as they are not saved to your
theme.json
and the database changes are removed (the latter is supposed to happen since that's what Create Block Theme is meant to do).I've have also noted this issue in the Gutenberg repo, and have been working on it with @aaronrobertshaw.
The text was updated successfully, but these errors were encountered: