theme.json styles changes not showing in the block editor
-
im trying to change styles in theme.json in my child-theme, the changes wont show in the block editor, it will show in the frontend.
i saw a lot of topics about changes wont show on frontend, but here its the other way around.the stack:
– server is LocalWP running nginx
– latest wordpress (6.4.2)
– latest WooCoomerce (8.4.0)
– also my own plugin called Epalle
– my theme is custom developed Storefront-child (child-theme of storefront)
– also some custom blocks and gutenberg modificationsthe case was changing the “outline” style variation of the block “core/button” in theme.json/style.blocks section. i kept it simple: just change the colors and add shadow, just to see a diffrenece:
"styles": { "blocks": { "core/button": { "variations": { "outline": { "color": { "text": "green", "background": "pink" }, "shadow": "6px 6px blue" } } } } }
those changes just didnt show up in the block editor. it did showed in the frontend of the site.
i would mention that changes i made to the theme.json/settings section did took place in the block editor (i added and removed the settings.blocks.core/button.border.radius and it affected the block editor)
things i have done to try to fix it:
- clear cache at the browesr level (CMD+SHIFT+R hard refresh)
- set WP_DEBUG and SCRIPT_DEBUG to TRUE, in wp-config.php
- set WP_DEVELOPMENT_MODE to ‘theme’, and then ‘all’
- remove all my custom code related to gutenberg
- change theme to TT4, and also try TT4-child theme to change theme.json
- deactivate my plugin, and WC plugin
none of the above worked. i have to admin that it make me frustrated.
i did spin up a fresh server of wordpress in LocalWP with TT4, and TT4-child theme, added theme.json to TT4-child and added this:
"styles": { "blocks": { "core/button": { "variations": { "outline": { "border": { "width": "15px" } } } } } }
it did worked, which make me a bit more frustrated ??
- The topic ‘theme.json styles changes not showing in the block editor’ is closed to new replies.