[Font styles] Quieter paragraph text + tighter EuiTitle tracking - #9900
[Font styles] Quieter paragraph text + tighter EuiTitle tracking#9900ryankeairns wants to merge 8 commits into
Conversation
Lock tighter title tracking (-0.2px) on the title token and euiTitle mixin so headings read slightly denser across Emotion and Sass. Co-authored-by: Cursor <cursoragent@cursor.com>
Bare EuiText now renders with textSubdued so body copy is quieter globally. Pass color="default" for full paragraph contrast; EuiTextColor's default stays textParagraph. Co-authored-by: Cursor <cursoragent@cursor.com>
Default size is now s (~14px) to match font.body.scale / unstyled html, so Kibana body copy stops mixing 14 and 16 when omitting size. Use size="m" for the previous default. Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh Jest snapshots for components that render bare EuiText, and document that the default matches the theme body scale. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Typography-focused refinements to support the Kibana visual refresh by adjusting title tracking and aligning EuiText defaults (size + color) with the theme’s intended body typography.
Changes:
- Added a theme token for title
letterSpacingand applied it toeuiTitle()/EuiTitle(Emotion + Sass). - Updated
EuiTextdefaults:size="s"(~14px) and (whencoloris omitted) subdued body text color, with docs/story updates to explain opt-ins (size="m",color="default"). - Updated Jest snapshots for components impacted by the new defaults.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/website/docs/components/display/text.mdx | Docs updated to explain new EuiText default size and default subdued color behavior. |
| packages/eui/src/components/title/title.styles.ts | euiTitle() now includes theme-driven letterSpacing. |
| packages/eui/src/components/title/snapshots/title.styles.test.ts.snap | Snapshot updates for added letterSpacing in euiTitle() output. |
| packages/eui/src/components/text/types.ts | Updated color prop JSDoc to describe subdued default behavior. |
| packages/eui/src/components/text/text.tsx | Default size changed from m to s. |
| packages/eui/src/components/text/text.styles.ts | Base .euiText now sets subdued text color by default. |
| packages/eui/src/components/text/text.stories.tsx | Story defaults aligned with new EuiText default size/color behavior. |
| packages/eui/src/components/text/snapshots/text.test.tsx.snap | Snapshot updates for new default size="s" classnames. |
| packages/eui/src/components/selectable/selectable_list/snapshots/selectable_list.test.tsx.snap | Snapshot hash updates due to downstream style changes. |
| packages/eui/src/components/page/page_header/snapshots/page_header.test.tsx.snap | Snapshot updates reflecting EuiText default size change. |
| packages/eui/src/components/page/page_header/snapshots/page_header_content.test.tsx.snap | Snapshot updates reflecting EuiText default size change. |
| packages/eui/src/components/empty_prompt/snapshots/empty_prompt.test.tsx.snap | Snapshot updates reflecting EuiText default size change. |
| packages/eui/src/components/datagrid/body/cell/snapshots/data_grid_cell.test.tsx.snap | Snapshot updates reflecting EuiText default size change. |
| packages/eui/src/components/banner/snapshots/banner.test.tsx.snap | Snapshot hash updates due to title style changes. |
| packages/eui-theme-common/src/global_styling/variables/typography.ts | Theme typing extended to include optional title letterSpacing. |
| packages/eui-theme-borealis/src/variables/_typography.ts | Borealis theme sets font.title.letterSpacing: '-0.2px'. |
| packages/eui-theme-borealis/src/variables/_typography.scss | Borealis Sass title map now includes letter-spacing: -0.2px. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
I have one blocking doubt regarding the change. If we call the prop value default but then we change it to not be the default, that's confusing. Should we rename it to "paragraph" or "fullContrast" or whatever instead?
Also, did we check the contrast in different scenarios? Changing to subdued could potentially cause contrast that doesn't match accessibility requirement in some cases, no?
Tone down Borealis paragraph/body text (light shade110, dark shade40) at the token level instead of painting EuiText subdued. Revert the component color default so bare EuiText inherits the quieter root again. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Good catch — I pivoted away from the Quieter body text now comes from softening Borealis |
💔 Build Failed
Failed CI StepsHistory
|
💔 Build Failed
Failed CI StepsHistory
|
Summary
Typography quick wins for the Kibana visual refresh. Closes #9901 (sub-task of epic #9893). Does not close the broader token-updates track (surfaces, radii, borders, semantic spacing).
colors.textParagraph(and legacycolors.text) softened toward subdued — lightshade110(#384861), darkshade40(#B4C1D5). Root/html, ThemeProvider body, and anything that inherits (including bareEuiText) pick this up.textSubduedandtextHeadingare unchanged, so headings/labels stay punchier than body copycolor: inherit(no component-level subdued paint). Passcolor/ useEuiTextColorwhen you need a named or custom colorfont.title.letterSpacing: -0.2px(Emotion + Sass)sizeis nowsto matchfont.body.scale/ unstyledhtml; passsize="m"for the previous ~16px defaultCommits (separable if blast radius is high)
textParagraphat the theme (replaces earlier EuiText-only subdued default)Color: theme token (not EuiText-only)
Earlier approach painted bare
EuiTextwithtextSubduedwhile leaving root/htmlon full paragraph. That broke inherit and madecolor="default"mean “not the default.”This PR instead tones down
textParagraphitself, so:html/ ThemeProvider body use the quieter paragraph colorEuiTextinherits that quieter baseEuiTextColor/color="default"map to the same (now quieter) paragraph tokentextHeadingremains the darker emphasis step for titles, tabs, labels, table headers, etc.Size / body alignment — shipped
euiTheme.basehtml/<p>font.body.scale: 's'EuiTextsize="m"Mismatch was EuiText’s default vs theme body, not “base isn’t 14.” Aligning them means default
size="s". Future global body bumps should changefont.body.scaleand keep EuiText’s default on that same scale step.EUI-internal blast radius for size: small (few components omit
size; many already uses). Consumer blast radius: intentional — bare<EuiText>in Kibana becomes 14px; usesize="m"for the previous default.Blast radius (honest)
textParagraph/ root inherit is used (most UI copy, tables, forms, links withcolor="text", etc.)EuiTextomitssizeeuiTitle()/EuiTitleis usedTest plan
color) — quieter paragraph; still darker thantextSubduedtextHeading(darker than paragraph)size="m"restores ~16pxScreenshots
Before/after for titles + body text — add from Storybook once the PR preview is up (or local Storybook).