• Resolved rose18

    (@rose18)


    Hi,

    When using theme.json, we are able to add fluid typography under font sizes like this:

    "fontSizes": [{
              "size": "0.95rem",
              "slug": "small",
              "fluid": false
            },
            {
              "size": "1.25rem",
              "slug": "medium",
              "fluid": {
                "min": "1rem",
                "max": "1.25rem"
              }
            },
            {
              "size": "3.4375rem",
              "slug": "large",
              "fluid": {
                "min": "1.35rem",
                "max": "3.4375rem"
              }
            },
            {
              "fluid": {
    	"min": "1.75rem",
             "max": "6.2105rem"
    	},
    	"size": "6.03125rem",
    	"slug": "x-large"
    	}
          ]

    Does it have the option to make line-height responsive/fluid for each font size in theme.json ?

    Thank you!

Viewing 1 replies (of 1 total)
  • Hi @rose18,

    You can only enable/disable line height option in the sidebar, there is no way (as far as I know) to change it in theme.json. When you enable it, you can change it per block, and the default is 1.5em.

    How to add it for all blocks:

    {
    	"version": 2,
    	"settings": {
    		"typography": {
    			"lineHeight": true
    		}
    	}
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Theme.json Fluid Line Height’ is closed to new replies.