• Hi all,

    I have recently shifted to the new tweeny tweeny-two theme and have been learning how to modify the theme. However, I can not figure out how to target and change the default container spacing in the theme.json.

    theme.json:
    This is used for many front-end-spacing logics.

    “spacing”: {
    “blockGap”: “1.5rem”
    },

    This is the inspector CSS:
    There are many instances of this class. It is getting dynamically generated each time a block is added.
    The variable is pulled from above.

    .wp-container-38 > * + * {
    margin-block-start: var( –wp–style–block-gap );
    }

    The child CSS hack that I have currently:

    div[class^=”wp-container”], div[class*=”wp-container”], div[class*=”wp-block-spacer”] {
    margin-block-start: 0;
    }

    How can I modify child theme.json to achieve the above CSS hack? This is required only for the front-end “wp-block-group” classes.

    This did not work for me…

    {
        "version": 1,
        "styles": {
            "blocks": {
                "core/group": {
                    "spacing": {
                        "marginBlockStart": "0"
                    }
                }
            }
        }
    }

    Any insight on how this works apricated, please.

    R

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress 6.0 & container spacing.’ is closed to new replies.