• Resolved saturn3

    (@saturn3)


    This variable:
    --wp--style--block-gap

    controls a lot. But I cannot figure out how it is set.

    These fikes in the Twenty Twenty Two theme folder include the variable in some form or another, even comments:
    theme.json
    template/archive.html
    template/home.html
    template/index.html
    template/search.html
    inc/patterns/query-default.php

    And I found other files in the general WordPress folders (I use Dreamweaver to search lots of files all at once).

    But there is nothing I can see where --wp--style--block-gap is set to some value. For example, it helps make the 24px top margin that I see when I inspect H1 and paragraph blocks.

    --wp--style--block-gap is calculated or set.. but how?

    • This topic was modified 2 years, 8 months ago by saturn3.
    • This topic was modified 2 years, 8 months ago by saturn3.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter saturn3

    (@saturn3)

    Found it. It’s in the JSON file around line 330:

    		"spacing": {
    			"blockGap": "1.5rem"
    		},

    This is what creates the --wp--style--block-gap.

    1.5rem calculates out to 24px on my inspections.

    Finally! I can set it to zero! ??

    Way to go @saturn3 !
    I hope that in future releases there will be a way to control the block margin via the template / site editor without the need to add custom CSS or to edit the JSON file.
    Any way – Thanks!

    Yes, good find @saturn3 … that did the trick.

    Now onto running down wp--preset--color--background

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How Is the Global Block Gap Set? AKA `–wp–style–block-gap`’ is closed to new replies.