From b591fcf8cf13bfa7d5dac2421158199ab473433e Mon Sep 17 00:00:00 2001 From: ramonjd Date: Fri, 13 Aug 2021 15:30:51 +1000 Subject: [PATCH] Initial commit. Adding typography fontSize and lineHeight supports defaults in block.json where the block supports each. --- packages/block-library/src/button/block.json | 5 ++++- packages/block-library/src/code/block.json | 5 ++++- packages/block-library/src/heading/block.json | 6 +++++- packages/block-library/src/list/block.json | 5 ++++- packages/block-library/src/navigation/block.json | 6 +++++- packages/block-library/src/paragraph/block.json | 6 +++++- packages/block-library/src/post-author/block.json | 6 +++++- packages/block-library/src/post-comments-count/block.json | 6 +++++- packages/block-library/src/post-comments-form/block.json | 6 +++++- packages/block-library/src/post-comments-link/block.json | 6 +++++- packages/block-library/src/post-comments/block.json | 6 +++++- packages/block-library/src/post-date/block.json | 6 +++++- packages/block-library/src/post-excerpt/block.json | 6 +++++- packages/block-library/src/post-terms/block.json | 6 +++++- packages/block-library/src/post-title/block.json | 6 +++++- packages/block-library/src/preformatted/block.json | 5 ++++- packages/block-library/src/query-pagination-next/block.json | 6 +++++- .../block-library/src/query-pagination-previous/block.json | 6 +++++- packages/block-library/src/query-title/block.json | 6 +++++- packages/block-library/src/site-tagline/block.json | 6 +++++- packages/block-library/src/site-title/block.json | 6 +++++- packages/block-library/src/term-description/block.json | 6 +++++- packages/block-library/src/verse/block.json | 5 ++++- 23 files changed, 110 insertions(+), 23 deletions(-) diff --git a/packages/block-library/src/button/block.json b/packages/block-library/src/button/block.json index 569ecc47fd0e7..99119b6d1d685 100644 --- a/packages/block-library/src/button/block.json +++ b/packages/block-library/src/button/block.json @@ -63,7 +63,10 @@ }, "typography": { "fontSize": true, - "__experimentalFontFamily": true + "__experimentalFontFamily": true, + "__experimentalDefaultControls": { + "fontSize": true + } }, "reusable": false, "spacing": { diff --git a/packages/block-library/src/code/block.json b/packages/block-library/src/code/block.json index 728aff7ac7973..cde92608bc92e 100644 --- a/packages/block-library/src/code/block.json +++ b/packages/block-library/src/code/block.json @@ -16,7 +16,10 @@ "anchor": true, "__experimentalSelector": ".wp-block-code > code", "typography": { - "fontSize": true + "fontSize": true, + "__experimentalDefaultControls": { + "fontSize": true + } } }, "style": "wp-block-code" diff --git a/packages/block-library/src/heading/block.json b/packages/block-library/src/heading/block.json index 69ec1ba3741a4..9d3f9701692f3 100644 --- a/packages/block-library/src/heading/block.json +++ b/packages/block-library/src/heading/block.json @@ -35,7 +35,11 @@ "typography": { "fontSize": true, "lineHeight": true, - "__experimentalFontWeight": true + "__experimentalFontWeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } }, "__experimentalSelector": "h1,h2,h3,h4,h5,h6", "__unstablePasteTextInline": true diff --git a/packages/block-library/src/list/block.json b/packages/block-library/src/list/block.json index 9df3b436f5f71..f69680386f4df 100644 --- a/packages/block-library/src/list/block.json +++ b/packages/block-library/src/list/block.json @@ -39,7 +39,10 @@ "className": false, "typography": { "fontSize": true, - "__experimentalFontFamily": true + "__experimentalFontFamily": true, + "__experimentalDefaultControls": { + "fontSize": true + } }, "color": { "gradients": true, diff --git a/packages/block-library/src/navigation/block.json b/packages/block-library/src/navigation/block.json index 79da72eb86a2f..ca4c3d548ee1b 100644 --- a/packages/block-library/src/navigation/block.json +++ b/packages/block-library/src/navigation/block.json @@ -82,7 +82,11 @@ "__experimentalFontWeight": true, "__experimentalTextTransform": true, "__experimentalFontFamily": true, - "__experimentalTextDecoration": true + "__experimentalTextDecoration": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "viewScript": "file:./view.min.js", diff --git a/packages/block-library/src/paragraph/block.json b/packages/block-library/src/paragraph/block.json index d05e48a7bebe2..d024ee2a8fce1 100644 --- a/packages/block-library/src/paragraph/block.json +++ b/packages/block-library/src/paragraph/block.json @@ -37,7 +37,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } }, "__experimentalSelector": "p", "__unstablePasteTextInline": true diff --git a/packages/block-library/src/post-author/block.json b/packages/block-library/src/post-author/block.json index f82c5662abeae..231f16a31b94b 100644 --- a/packages/block-library/src/post-author/block.json +++ b/packages/block-library/src/post-author/block.json @@ -29,7 +29,11 @@ "html": false, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } }, "color": { "gradients": true, diff --git a/packages/block-library/src/post-comments-count/block.json b/packages/block-library/src/post-comments-count/block.json index 7aded93b0fad0..6435eca17e689 100644 --- a/packages/block-library/src/post-comments-count/block.json +++ b/packages/block-library/src/post-comments-count/block.json @@ -18,7 +18,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } } } diff --git a/packages/block-library/src/post-comments-form/block.json b/packages/block-library/src/post-comments-form/block.json index 38a14829358f0..6cfc5fd6396a5 100644 --- a/packages/block-library/src/post-comments-form/block.json +++ b/packages/block-library/src/post-comments-form/block.json @@ -19,7 +19,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "style": "wp-block-post-comments-form" diff --git a/packages/block-library/src/post-comments-link/block.json b/packages/block-library/src/post-comments-link/block.json index b1b8264725182..3f5739a48fcf1 100644 --- a/packages/block-library/src/post-comments-link/block.json +++ b/packages/block-library/src/post-comments-link/block.json @@ -19,7 +19,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } } } diff --git a/packages/block-library/src/post-comments/block.json b/packages/block-library/src/post-comments/block.json index 733c64c67189f..289bf152a78e9 100644 --- a/packages/block-library/src/post-comments/block.json +++ b/packages/block-library/src/post-comments/block.json @@ -16,7 +16,11 @@ "align": [ "wide", "full" ], "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } }, "color": { "gradients": true, diff --git a/packages/block-library/src/post-date/block.json b/packages/block-library/src/post-date/block.json index 260e5f1c2a31f..1a361cd0a71f0 100644 --- a/packages/block-library/src/post-date/block.json +++ b/packages/block-library/src/post-date/block.json @@ -26,7 +26,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } } } diff --git a/packages/block-library/src/post-excerpt/block.json b/packages/block-library/src/post-excerpt/block.json index a066c4250a88c..084c66646dd74 100644 --- a/packages/block-library/src/post-excerpt/block.json +++ b/packages/block-library/src/post-excerpt/block.json @@ -26,7 +26,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "editorStyle": "wp-block-post-excerpt-editor", diff --git a/packages/block-library/src/post-terms/block.json b/packages/block-library/src/post-terms/block.json index a79af6ef85539..ec8c7aebebcf6 100644 --- a/packages/block-library/src/post-terms/block.json +++ b/packages/block-library/src/post-terms/block.json @@ -26,7 +26,11 @@ }, "typography": { "lineHeight": true, - "fontSize": true + "fontSize": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "style": "wp-block-post-terms" diff --git a/packages/block-library/src/post-title/block.json b/packages/block-library/src/post-title/block.json index b20985442e01a..2020de686feb0 100644 --- a/packages/block-library/src/post-title/block.json +++ b/packages/block-library/src/post-title/block.json @@ -38,7 +38,11 @@ "typography": { "fontSize": true, "lineHeight": true, - "__experimentalFontFamily": true + "__experimentalFontFamily": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "style": "wp-block-post-title" diff --git a/packages/block-library/src/preformatted/block.json b/packages/block-library/src/preformatted/block.json index 6deb40540b6c0..21e5f9a58917a 100644 --- a/packages/block-library/src/preformatted/block.json +++ b/packages/block-library/src/preformatted/block.json @@ -21,7 +21,10 @@ "gradients": true }, "typography": { - "fontSize": true + "fontSize": true, + "__experimentalDefaultControls": { + "fontSize": true + } } }, "style": "wp-block-preformatted" diff --git a/packages/block-library/src/query-pagination-next/block.json b/packages/block-library/src/query-pagination-next/block.json index afc69d6e14a3b..c2c9e5e22dfed 100644 --- a/packages/block-library/src/query-pagination-next/block.json +++ b/packages/block-library/src/query-pagination-next/block.json @@ -21,7 +21,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } } } diff --git a/packages/block-library/src/query-pagination-previous/block.json b/packages/block-library/src/query-pagination-previous/block.json index 78a53867d0b7a..ee51a9ff0e4c5 100644 --- a/packages/block-library/src/query-pagination-previous/block.json +++ b/packages/block-library/src/query-pagination-previous/block.json @@ -21,7 +21,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } } } diff --git a/packages/block-library/src/query-title/block.json b/packages/block-library/src/query-title/block.json index 3e5d43fc50846..bc7aeea576492 100644 --- a/packages/block-library/src/query-title/block.json +++ b/packages/block-library/src/query-title/block.json @@ -26,7 +26,11 @@ "typography": { "fontSize": true, "lineHeight": true, - "__experimentalFontFamily": true + "__experimentalFontFamily": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "editorStyle": "wp-block-query-title-editor" diff --git a/packages/block-library/src/site-tagline/block.json b/packages/block-library/src/site-tagline/block.json index 9a70f6d3891c5..cdc4ad09872be 100644 --- a/packages/block-library/src/site-tagline/block.json +++ b/packages/block-library/src/site-tagline/block.json @@ -26,7 +26,11 @@ "__experimentalFontFamily": true, "__experimentalFontWeight": true, "__experimentalTextTransform": true, - "__experimentalLetterSpacing": true + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "editorStyle": "wp-block-site-tagline-editor" diff --git a/packages/block-library/src/site-title/block.json b/packages/block-library/src/site-title/block.json index 1d148ac303a19..0e66297b0ddd3 100644 --- a/packages/block-library/src/site-title/block.json +++ b/packages/block-library/src/site-title/block.json @@ -33,7 +33,11 @@ "__experimentalTextTransform": true, "__experimentalFontStyle": true, "__experimentalFontWeight": true, - "__experimentalLetterSpacing": true + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "editorStyle": "wp-block-site-title-editor" diff --git a/packages/block-library/src/term-description/block.json b/packages/block-library/src/term-description/block.json index 1f2da2be43057..807b9ac98a208 100644 --- a/packages/block-library/src/term-description/block.json +++ b/packages/block-library/src/term-description/block.json @@ -18,7 +18,11 @@ }, "typography": { "fontSize": true, - "lineHeight": true + "lineHeight": true, + "__experimentalDefaultControls": { + "fontSize": true, + "lineHeight": true + } } }, "editorStyle": "wp-block-term-description-editor" diff --git a/packages/block-library/src/verse/block.json b/packages/block-library/src/verse/block.json index ec080e7c1ed13..b71c4042e7841 100644 --- a/packages/block-library/src/verse/block.json +++ b/packages/block-library/src/verse/block.json @@ -27,7 +27,10 @@ }, "typography": { "fontSize": true, - "__experimentalFontFamily": true + "__experimentalFontFamily": true, + "__experimentalDefaultControls": { + "fontSize": true + } }, "spacing": { "padding": true