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: +70 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 3181110. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23239904492
|
|
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.
There was a problem hiding this comment.
Opened issue:
There was a problem hiding this comment.
@jameskoster after rebase I'm getting lint issues:
Error: /home/runner/work/gutenberg/gutenberg/packages/admin-ui/src/breadcrumbs/index.tsx: line 6, col 10, Error - `Text` from `@wordpress/ui` is not yet recommended for use in a WordPress environment. (@wordpress/use-recommended-components)
Error: /home/runner/work/gutenberg/gutenberg/packages/admin-ui/src/page/header.tsx: line 4, col 17, Error - `Text` from `@wordpress/ui` is not yet recommended for use in a WordPress environment. (@wordpress/use-recommended-components)
Looks like coming from #76222 — @mirka @ciampo we were using Text from UI in this PR. I understand I should revert back to using CSS variables instead?
There was a problem hiding this comment.
probably better to use the DS tokens directly + adding a TODO for now, until we have a solid solution to limiting CSS overrides
|
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
568ff76 to
7f6eaad
Compare
|
Thanks @jasmussen and @jameskoster ! I updated PR with:
|
1732fb9 to
f5337a2
Compare
|
Rebased with changes in #76456 to the Header component. |
c0c5e8b to
41b5be8
Compare
|
I noticed that I'm also wondering if we should reduce the size of the Sidebar header too. It sticks out like a sore thumb now :) Fine to handle that separately. |
41b5be8 to
672fa0b
Compare
9c0e5eb to
3181110
Compare
|
I think this is okay, but we'll want to follow up:
|
|
Sounds good! I'll work on those next. |
|
* Admin UI: update font size * Admin UI: Tighten padding in header * Site editor: Use compact size for buttons inside Page actions




What?
compactsize when used inside Page component (patterns, templates and pages in site editor)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
Before
Appearance → Fonts
Settings → Connectors
Appearance → Editor → Pages
Appearance → Editor → Templates
Appearance → Editor → Patterns
After
Appearance → Fonts
Settings → Connectors
Appearance → Editor → Pages
Appearance → Editor → Templates
Appearance → Editor → Patterns