classic theme using theme.json dont show styles in the block editor
-
Hello,
i have a wordpress woocommerce site that is using a classic theme (storefront) with a child theme that i wrote.
i wanted to use gutenberg and to get the best experience from it, so i have created a theme.json to better control the styles and settings of the blocks.i ran into a problem:
the theme.json is processed ok, and when i am using blocks in gutenberg, everything is working fine on the frontend, the problem is that some of the styles are not appearing in the gutenberg editor.here is an example i did to test it:
a group block, having inside 3 groups,
each group has different align: none, wide and full.
the problem is that they all showing as full in the editor.in the frontend it look like this:
i am searching for a solution for few days now, including digging in to docs, reading gutenberg guides and asking in forums. cant find it.
i would realy appreciate help on that topic, a solution or a direction to search in.thanks!
my theme.json for refference:
{ "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 2, "settings": { "appearanceTools": true, "useRootPaddingAwareAlignments": false, "layout": { "contentSize": "650px", "wideSize": "1000px" }, "border": { "color": true, "radius": true, "style": true, "width": true }, "color": { "text": true, "background": true, "custom": true, "customDuotone": true, "customGradient": true, "defaultPalette": true, "palette": [ { "name": "Primary", "slug": "primary", "color": "#3239FF" }, { "name": "Dark", "slug": "dark", "color": "#222F3E" }, { "name": "Light", "slug": "light", "color": "#FFFFFF" } ] }, "shadow": { "defaultPresets": true, "presets": [ { "name": "Natural", "slug": "natural", "shadow": "6px 6px 9px rgba(0, 0, 0, 0.2)" }, { "name": "Deep", "slug": "deep", "shadow": "12px 12px 50px rgba(0, 0, 0, 0.4)" }, { "name": "Sharp", "slug": "sharp", "shadow": "6px 6px 0px rgba(0, 0, 0, 0.2)" }, { "name": "Outlined", "slug": "outlined", "shadow": "6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)" }, { "name": "Crisp", "slug": "crisp", "shadow": "6px 6px 0px rgba(0, 0, 0, 1)" } ] }, "spacing": { "blockGap": true, "customSpacingSize": true, "units": [ "px", "em", "rem", "vh", "vw", "%" ], "spacingScale": { "operator": "*", "increment": 1.5, "steps": 7, "mediumStep": 1.5, "unit": "rem" } }, "typography": { "customFontSize": true, "dropCap": true, "fontSizes": [ { "name": "Small", "slug": "small", "size": "13px" }, { "name": "Medium", "slug": "medium", "size": "20px" }, { "name": "Large", "slug": "large", "size": "36px" }, { "name": "Extra Large", "slug": "x-large", "size": "42px" } ], "fontStyle": true, "fontWeight": true, "letterSpacing": true, "lineHeight": false, "textDecoration": true, "textTransform": true, "writingMode": false, "fluid": true }, "blocks": { "core/button": { "border": { "radius": true }, "appearanceTools": true }, "core/image": { "lightbox": { "allowEditing": true } }, "core/pullquote": { "border": { "color": true, "radius": true, "style": true, "width": true } }, "core/group": { "color": { "text": true, "background": true, "link": true } } } }, "styles": { "color": { "background": "var(--wp--preset--color--light)", "text": "var(--wp--preset--color--dark)" }, "elements": { "button": { "color": { "text": "#fff", "background": "#32373c" }, "spacing": { "padding": "calc(0.667em + 2px) calc(1.333em + 2px)" }, "typography": { "fontSize": "inherit", "fontFamily": "inherit", "lineHeight": "inherit", "textDecoration": "none" }, "border": { "width": "0" } }, "link": { "typography": { "textDecoration": "underline" } }, "heading": { "color": { "text": "var(--wp--preset--color--dark)" } } }, "spacing": { "blockGap": "24px", "padding": { "top": "0px", "right": "0px", "bottom": "0px", "left": "0px" } } } }
?
- The topic ‘classic theme using theme.json dont show styles in the block editor’ is closed to new replies.