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

Table of Contents: Add typography support #43509

Merged
merged 1 commit into from Aug 24, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adds typography supports to the Table of Contents block.

Why?

  • Improves consistency of our design tools across blocks.

How?

  • Opts into all typography supports.
  • Makes font size control displayed by default as per majority of blocks currently.

Testing Instructions

  1. Edit a post, add a Table of Contents block along with several headings of varied levels.
  2. Select the Table of Contents block and adjust its typography via the sidebar.
  3. Ensure the selected styles are reflected in both the editor and frontend.
  4. Reset the blocks styles and save.
  5. Load the site editor and navigate to Global Styles > Blocks > Table of Contents > Typography.
  6. Double check that adjusted typography settings are reflected in the preview and are applied on frontend after saving.
  7. Confirm that theme.json styling of the Table of Contents works as expected.

Example theme.json snippet:

			"core/table-of-contents": {
				"typography": {
					"fontWeight": "100",
					"textTransform": "uppercase"
				}
			}

Screenshots or screencast

Screen.Recording.2022-08-23.at.7.22.55.pm.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Table of contents (experimental) Affects the Table of contents Block [Feature] Typography Font and typography-related issues and PRs labels Aug 23, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 23, 2022
Copy link
Member

@ZebulanStanphill ZebulanStanphill left a comment

Choose a reason for hiding this comment

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

Looks good to merge! 👍

@aaronrobertshaw aaronrobertshaw merged commit 4edaf18 into trunk Aug 24, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/typography-support-to-table-of-contents branch August 24, 2022 05:59
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 24, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table of contents (experimental) Affects the Table of contents Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Typography Font and typography-related issues and PRs Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants