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

[WIP] Navigation Submenu: Add typography support #44008

Closed

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

⚠️ 🚧 Application of text decoration styles needs work as they won't get inherited by submenu navigation links. 🚧 ⚠️

We could possibly skip the text-decoration support now if we maintain the other typography styles on the block wrapper in future. An alternate option might be to skip serialization of the typography styles but manually apply all but the text-decoration class names and styles to the wrapper.

What?

Adds typography supports to the Navigation block.

Why?

  • Improves consistency of our design tools across blocks.
  • Allows typography styling of navigation submenus independent of the Navigation block's styles.

How?

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

Testing Instructions

  1. In the site editor, edit a template with a Navigation block, and add a submenu complete with a few links.
  2. Navigate to Global Styles > Blocks > Navigation Submenu > Typography.
  3. Experiment with typography styles and ensure they are applied to the Navigation Submenu blocks in the preview.
  4. Select your Navigation Submenu block and switch to the settings sidebar.
  5. Within the typography panel, configure some overriding styles. These should be reflected in the preview.
  6. Save and confirm styles on the frontend.
  7. For bonus points you can also test theme.json to be thorough.

Example theme.json snippet:

			"core/navigation-submenu": {
				"typography": {
					"fontWeight": "100",
					"textTransform": "uppercase"
				}
			}

Screenshots or screencast

@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] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Typography Font and typography-related issues and PRs labels Sep 9, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Sep 9, 2022
@github-actions github-actions bot added the Stale label Oct 12, 2022
@priethor priethor removed the Stale label Jul 4, 2023
@aaronrobertshaw
Copy link
Contributor Author

Closing this draft as I don't have the bandwidth to revisit alternative approaches at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Submenu Affects the Submenu Block - for submenus in navigation [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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants