Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move fontSize and lineHeight properties to typography object #1898

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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
Expand Down