Admin UI: update font size for title and breadcrumbs to match#76452
Admin UI: update font size for title and breadcrumbs to match#76452
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -39 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 59b20df. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23008385942
|
|
Thanks for this. It's a tricky one; I whole-heartedly support the PR and the motivation and examples are clear, but Pages example looks anemic. I believe Jay, already pinged, has been looking into this particular header component, so he may have the solution handy, so hopefully he can propose a font size/weight that threads the needle! |
| font-family: var(--wpds-font-family-heading); | ||
| font-size: var(--wpds-font-size-lg); | ||
| font-weight: var(--wpds-font-weight-medium); | ||
| line-height: var(--wpds-font-line-height-lg); |
There was a problem hiding this comment.
Could/should we use Text rather than styling manually? I think there's a variant that matches this style 1:1.
There was a problem hiding this comment.
Ah nice, didn't realise Text was already part of wp-ui. 👍
There was a problem hiding this comment.
Testing Text out with 1e43dfc
The Text produces the same size as CSS, but font-size gets overridden with 1.3em, and then it ends up being bigger than 15px:
I could not use h1/h2 which would solve it?
@jameskoster perhaps first best updating just with CSS variables, and then once styles are dialled in, we can switch to components? I noticed breadcrumbs has some @wordpress/components and one variable still so we could update it all at once. I reverted back to CSS in 568ff76.
I also see breadcumbs uses h1 for first element, while title is h2. They should probably match.
|
The current version of Breadcrumps is using a fixed value, so there could be a new fixed shared value that works in the header for now and is slightly bigger than |
59b20df to
1e43dfc
Compare
This reverts commit 1e43dfc.




What?
Updates title and breadcrumbs font sizes to match.
Titles are now slightly smaller, and breadcrumbs slightly larger.
Part of #76448
Why?
Consolidate font sizes so that there's is no visual "jump" between pages using breadcrumbs or a title in the header.
How?
Testing Instructions
Try breadcrumbs locally with the component:
...or just use Storybook added in:
Testing Instructions for Keyboard
Screenshots or screencast
Fonts
Before
After
Pages
Before
After