diff --git a/src/schemas/json/block.json b/src/schemas/json/block.json index 0d3d3439d05..1d31d792b84 100644 --- a/src/schemas/json/block.json +++ b/src/schemas/json/block.json @@ -243,7 +243,7 @@ }, "fontSize": { "type": "boolean", - "description": "This value signals that a block supports the font-size CSS style property. When it does, the block editor will show an UI control for the user to set its value.\n\nThe values shown in this control are the ones declared by the theme via the editor-font-sizes theme support, or the default ones if none is provided.\n\nWhen the block declares support for fontSize, the attributes definition is extended to include two new attributes: fontSize and style", + "description": "Deprecated. As of WordPress 5.8, fontSize should appear in the supports.typography object.", "default": false }, "html": { @@ -258,7 +258,7 @@ }, "lineHeight": { "type": "boolean", - "description": "This value signals that a block supports the line-height CSS style property. When it does, the block editor will show an UI control for the user to set its value if the theme declares support.\n\nWhen the block declares support for lineHeight, the attributes definition is extended to include a new attribute style of object type with no default assigned. It stores the custom value set by the user. The block can apply a default style by specifying its own style attribute with a default", + "description": "Deprecated. As of WordPress 5.8, lineHeight should appear in the supports.typography object.", "default": false }, "multiple": { @@ -350,6 +350,22 @@ ] } } + }, + "typography":{ + "type":"object", + "description": "This value signals that a block supports some of the CSS style properties related to typography. When it does, the block editor will show UI controls for the user to set their values", + "properties": { + "fontSize": { + "type": "boolean", + "description": "This value signals that a block supports the font-size CSS style property. When it does, the block editor will show an UI control for the user to set its value.\n\nThe values shown in this control are the ones declared by the theme via the editor-font-sizes theme support, or the default ones if none is provided.\n\nWhen the block declares support for fontSize, the attributes definition is extended to include two new attributes: fontSize and style", + "default": false + }, + "lineHeight": { + "type": "boolean", + "description": "This value signals that a block supports the line-height CSS style property. When it does, the block editor will show an UI control for the user to set its value if the theme declares support.\n\nWhen the block declares support for lineHeight, the attributes definition is extended to include a new attribute style of object type with no default assigned. It stores the custom value set by the user. The block can apply a default style by specifying its own style attribute with a default", + "default": false + } + } } }, "additionalProperties": true