Skip to content

Commit

Permalink
Initial commit. Adding typography fontSize and lineHeight supports de…
Browse files Browse the repository at this point in the history
…faults in block.json where the block supports each.
  • Loading branch information
ramonjd committed Aug 13, 2021
1 parent 7ea5e5b commit b591fcf
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 23 deletions.
5 changes: 4 additions & 1 deletion packages/block-library/src/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
},
"typography": {
"fontSize": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"reusable": false,
"spacing": {
Expand Down
5 changes: 4 additions & 1 deletion packages/block-library/src/code/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"anchor": true,
"__experimentalSelector": ".wp-block-code > code",
"typography": {
"fontSize": true
"fontSize": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-code"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/heading/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion packages/block-library/src/list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"className": false,
"typography": {
"fontSize": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"color": {
"gradients": true,
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
"__experimentalFontWeight": true,
"__experimentalTextTransform": true,
"__experimentalFontFamily": true,
"__experimentalTextDecoration": true
"__experimentalTextDecoration": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"viewScript": "file:./view.min.js",
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/paragraph/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
},
"__experimentalSelector": "p",
"__unstablePasteTextInline": true
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-author/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
"html": false,
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
},
"color": {
"gradients": true,
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-comments-count/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
}
}
6 changes: 5 additions & 1 deletion packages/block-library/src/post-comments-form/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"style": "wp-block-post-comments-form"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-comments-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
}
}
6 changes: 5 additions & 1 deletion packages/block-library/src/post-comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
"align": [ "wide", "full" ],
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
},
"color": {
"gradients": true,
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
}
}
6 changes: 5 additions & 1 deletion packages/block-library/src/post-excerpt/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"editorStyle": "wp-block-post-excerpt-editor",
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-terms/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
},
"typography": {
"lineHeight": true,
"fontSize": true
"fontSize": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"style": "wp-block-post-terms"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"style": "wp-block-post-title"
Expand Down
5 changes: 4 additions & 1 deletion packages/block-library/src/preformatted/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"gradients": true
},
"typography": {
"fontSize": true
"fontSize": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-preformatted"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/query-pagination-next/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
}
}
6 changes: 5 additions & 1 deletion packages/block-library/src/query-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"editorStyle": "wp-block-query-title-editor"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/site-tagline/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/site-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/term-description/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
},
"typography": {
"fontSize": true,
"lineHeight": true
"lineHeight": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true
}
}
},
"editorStyle": "wp-block-term-description-editor"
Expand Down
5 changes: 4 additions & 1 deletion packages/block-library/src/verse/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
},
"typography": {
"fontSize": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"spacing": {
"padding": true
Expand Down

0 comments on commit b591fcf

Please sign in to comment.