Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/text-wrap-widows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/ui': patch
---

Headings now use `text-wrap: balance` and body text uses `text-wrap: pretty` to reduce widows and orphans when text wraps across lines. This is a progressive enhancement that falls back to normal wrapping in browsers without support.
1 change: 1 addition & 0 deletions packages/ui/src/primitives/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { applyVariants, filterProps } = createVariants(theme => ({
boxSizing: 'border-box',
color: `${theme.colors.$colorForeground}`,
margin: 0,
textWrap: 'balance',
},
variants: {
textVariant: { ...common.textVariants(theme) },
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/primitives/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const { applyVariants, filterProps } = createVariants(theme => {
boxSizing: 'border-box',
margin: 0,
fontSize: 'inherit',
textWrap: 'pretty',
...common.disabled(theme),
},
variants: {
Expand Down
Loading