Skip to content

[Font styles] Quieter paragraph text + tighter EuiTitle tracking - #9900

Draft
ryankeairns wants to merge 8 commits into
mainfrom
typography-quieter-text-tighter-titles
Draft

[Font styles] Quieter paragraph text + tighter EuiTitle tracking#9900
ryankeairns wants to merge 8 commits into
mainfrom
typography-quieter-text-tighter-titles

Conversation

@ryankeairns

@ryankeairns ryankeairns commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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).

  • Paragraph / body color (theme): Borealis colors.textParagraph (and legacy colors.text) softened toward subdued — light shade110 (#384861), dark shade40 (#B4C1D5). Root/html, ThemeProvider body, and anything that inherits (including bare EuiText) pick this up. textSubdued and textHeading are unchanged, so headings/labels stay punchier than body copy
  • EuiText: keeps color: inherit (no component-level subdued paint). Pass color / use EuiTextColor when you need a named or custom color
  • EuiTitle: tighter tracking via font.title.letterSpacing: -0.2px (Emotion + Sass)
  • EuiText size: default size is now s to match font.body.scale / unstyled html; pass size="m" for the previous ~16px default

Commits (separable if blast radius is high)

  1. Title letter-spacing
  2. Soften textParagraph at the theme (replaces earlier EuiText-only subdued default)
  3. Align default EuiText size with theme body (+ Jest snapshots/docs)

Color: theme token (not EuiText-only)

Earlier approach painted bare EuiText with textSubdued while leaving root/html on full paragraph. That broke inherit and made color="default" mean “not the default.”

This PR instead tones down textParagraph itself, so:

  • html / ThemeProvider body use the quieter paragraph color
  • Bare EuiText inherits that quieter base
  • EuiTextColor / color="default" map to the same (now quieter) paragraph token
  • textHeading remains the darker emphasis step for titles, tabs, labels, table headers, etc.

Size / body alignment — shipped

Concept Actual
euiTheme.base 16 — spacing/grid unit, not body text (left alone)
Unstyled html / <p> Already ~14px via font.body.scale: 's'
Prior default EuiText ~16px via size="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 change font.body.scale and keep EuiText’s default on that same scale step.

EUI-internal blast radius for size: small (few components omit size; many already use s). Consumer blast radius: intentional — bare <EuiText> in Kibana becomes 14px; use size="m" for the previous default.

Blast radius (honest)

  • Global quieter body wherever textParagraph / root inherit is used (most UI copy, tables, forms, links with color="text", etc.)
  • Global smaller body wherever bare EuiText omits size
  • Title tracking slightly tighter everywhere euiTitle() / EuiTitle is used
  • Out of scope: surfaces, borders, radii, tabs chrome, buttons, panels (beyond inherited text color)

Test plan

  • Storybook: body / EuiText (no color) — quieter paragraph; still darker than textSubdued
  • Storybook: EuiTitle / tabs / form labels — still use textHeading (darker than paragraph)
  • Storybook: EuiTitle sizes — tighter tracking
  • Storybook: EuiText default size matches unstyled body (~14px); size="m" restores ~16px
  • Spot-check EmptyPrompt / ConfirmModal / page header description / tables
  • Jest snapshots updated where needed
  • Update VRT baselines after PR Storybook deploys

Screenshots

Before/after for titles + body text — add from Storybook once the PR preview is up (or local Storybook).

ryankeairns and others added 4 commits August 11, 2026 15:17
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>
Copilot AI lite review requested due to automatic review settings August 11, 2026 22:44
@ryankeairns
ryankeairns requested a review from a team as a code owner August 11, 2026 22:44
Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 letterSpacing and applied it to euiTitle()/EuiTitle (Emotion + Sass).
  • Updated EuiText defaults: size="s" (~14px) and (when color is 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.

Comment thread packages/eui/src/components/text/types.ts
Comment thread packages/eui/src/components/text/text.styles.ts
Comment thread packages/eui/src/components/text/text.tsx Outdated

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

@ryankeairns
ryankeairns marked this pull request as draft August 12, 2026 14:50
ryankeairns and others added 2 commits August 12, 2026 10:14
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>
@ryankeairns ryankeairns changed the title [typography] Quieter EuiText + tighter EuiTitle tracking [typography] Quieter paragraph text + tighter EuiTitle tracking Aug 12, 2026
@ryankeairns ryankeairns changed the title [typography] Quieter paragraph text + tighter EuiTitle tracking [Typography] Quieter paragraph text + tighter EuiTitle tracking Aug 12, 2026
@ryankeairns

Copy link
Copy Markdown
Contributor Author

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?

Good catch — I pivoted away from the EuiText change for exactly that reason. EuiText inherits again, as it did before.

Quieter body text now comes from softening Borealis textParagraph. In short, I chose a color between the old textParagraph and textSubdued.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💔 Build Failed

Failed CI Steps

History

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💔 Build Failed

Failed CI Steps

History

@ryankeairns ryankeairns changed the title [Typography] Quieter paragraph text + tighter EuiTitle tracking [Font styles] Quieter paragraph text + tighter EuiTitle tracking Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typography] Quieter default text, tighter EuiTitle tracking, align EuiText size with body

3 participants