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

Home Link: Add typography support #43307

Merged
merged 1 commit into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Create a link that always points to the homepage of the site. Usually not necess

- **Name:** core/home-link
- **Category:** design
- **Supports:** ~~html~~, ~~reusable~~
- **Supports:** typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't seem to ever list the full set of typography options, right? I notice other blocks look the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the output from the automatic doc generation. I believe it doesn't include any experimental APIs.

One of the later phases of the design tool consistency effort will be to stabilize our block support APIs. These docs will be updated again we that happens.

- **Attributes:** label

## Custom HTML
Expand Down
15 changes: 14 additions & 1 deletion packages/block-library/src/home-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,20 @@
],
"supports": {
"reusable": false,
"html": false
"html": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-home-link-editor",
"style": "wp-block-home-link"
Expand Down