Typography utilities: font size, weight and line height, text alignment, transform, style and decoration, word breaking, white-space and letter spacing.
All classes above support responsive variants with the @breakpoint suffix, except .break-* and .whitespace-*:
Generated from the doc blocks in the core source when the site is built, so it always matches the current release of @wovenui/core. Every example is compiled against core during the build; open Compiled CSS under an example to see its output. Guide: Typography . The A to Z index lists every public mixin and function.
Mixins font-size font leading leading-none leading-tight leading-snug leading-normal leading-relaxed leading-loose text-left text-center text-right text-justify text-start text-end uppercase lowercase capitalize normal-case italic not-italic underline line-through no-underline break-normal break-words break-all whitespace-normal whitespace-nowrap whitespace-pre whitespace-pre-line whitespace-pre-wrap tracking tracking-tighter tracking-tight tracking-normal tracking-wide tracking-wider tracking-widest responsive-typography
font-size mixin Sets font-size from a $font-sizes key (lg gives var(--wu-font-size-lg)) or a raw value; an unknown key or unitless number raises an error.
Parameter Type Default Description $sizeString|Length|CalculationRequired Font size key, 0, a value with a unit, calc(), var() or a CSS font-size keyword
Example 1
@include font-size ( lg ) ; // font-size: var(--wu-font-size-lg)
Compiled CSS font-size : var ( --wu-font-size-lg );
Example 2
@include font-size ( clamp ( 2 rem , 5 vw , 3 rem ) ) ;
Compiled CSS font-size : clamp ( 2 rem , 5 vw , 3 rem );
font-size on MDN
See also: font , leading , tracking . Source: utilities/_typography.scss:74
font mixin Sets font-weight from a $font-weights key (bold gives var(--wu-font-weight-bold)) or a unitless number from 1 to 1000; anything else raises an error.
Parameter Type Default Description $weightString|NumberRequired Font weight key (thin to black) or a number from 1 to 1000
Example 1
@include font ( semibold ) ; // font-weight: var(--wu-font-weight-semibold)
Compiled CSS font-weight : var ( --wu-font-weight-semibold );
Example 2
@include apply ( font-size ( xl ), font ( bold ), leading ( tight ) ) ;
Compiled CSS font-size : var ( --wu-font-size-xl );
font-weight : var ( --wu-font-weight-bold );
line-height : var ( --wu-line-height-tight );
font-weight on MDN
See also: font-size . Source: utilities/_typography.scss:127
leading mixin Sets line-height from a $line-heights key (tight gives var(--wu-line-height-tight)) or a raw value; negative or unknown values raise an error.
Parameter Type Default Description $valueString|Number|Length|CalculationRequired Line height key, a number or length of 0 or more (also as a string), calc(), var() or a keyword
Example 1
@include leading ( relaxed ) ; // line-height: var(--wu-line-height-relaxed)
Compiled CSS line-height : var ( --wu-line-height-relaxed );
Example 2
@include leading ( 1.6 ) ; // line-height: 1.6
Compiled CSS line-height on MDN
See also: leading-normal , font-size . Source: utilities/_typography.scss:214
leading-none mixin Sets line-height to the none key (var(--wu-line-height-none)); raises an error if the key is missing from $line-heights.
Example
@include leading-none ; // line-height: var(--wu-line-height-none)
Compiled CSS line-height : var ( --wu-line-height-none );
See also: leading . Source: utilities/_typography.scss:271
leading-tight mixin Sets line-height to the tight key (var(--wu-line-height-tight)); raises an error if the key is missing from $line-heights.
Example
@include leading-tight ; // line-height: var(--wu-line-height-tight)
Compiled CSS line-height : var ( --wu-line-height-tight );
See also: leading . Source: utilities/_typography.scss:281
leading-snug mixin Sets line-height to the snug key (var(--wu-line-height-snug)); raises an error if the key is missing from $line-heights.
Example
@include leading-snug ; // line-height: var(--wu-line-height-snug)
Compiled CSS line-height : var ( --wu-line-height-snug );
See also: leading . Source: utilities/_typography.scss:291
leading-normal mixin Sets line-height to the normal key (var(--wu-line-height-normal)); raises an error if the key is missing from $line-heights.
Example
@include leading-normal ; // line-height: var(--wu-line-height-normal)
Compiled CSS line-height : var ( --wu-line-height-normal );
See also: leading . Source: utilities/_typography.scss:301
leading-relaxed mixin Sets line-height to the relaxed key (var(--wu-line-height-relaxed)); raises an error if the key is missing from $line-heights.
Example
@include leading-relaxed ; // line-height: var(--wu-line-height-relaxed)
Compiled CSS line-height : var ( --wu-line-height-relaxed );
See also: leading . Source: utilities/_typography.scss:311
leading-loose mixin Sets line-height to the loose key (var(--wu-line-height-loose)); raises an error if the key is missing from $line-heights.
Example
@include leading-loose ; // line-height: var(--wu-line-height-loose)
Compiled CSS line-height : var ( --wu-line-height-loose );
See also: leading . Source: utilities/_typography.scss:321
text-left mixin Aligns text to the left (physical, does not follow text direction).
Example
@include text-left ; // text-align: left
Compiled CSS text-align on MDN
See also: text-start , text-right . Source: utilities/_typography.scss:335
text-center mixin Centers text.
Example
@include text-center ; // text-align: center
Compiled CSS text-align on MDN
See also: text-start , text-end . Source: utilities/_typography.scss:347
text-right mixin Aligns text to the right (physical, does not follow text direction).
Example
@include text-right ; // text-align: right
Compiled CSS text-align on MDN
See also: text-end , text-left . Source: utilities/_typography.scss:359
text-justify mixin Justifies text to both edges.
Example
@include text-justify ; // text-align: justify
Compiled CSS text-align on MDN
Source: utilities/_typography.scss:369
text-start mixin Aligns text to the inline start: left in LTR, right in RTL.
Example
@include text-start ; // text-align: start
Compiled CSS text-align on MDN
See also: text-end , text-left . Source: utilities/_typography.scss:381
text-end mixin Aligns text to the inline end: right in LTR, left in RTL.
Example
@include text-end ; // text-align: end
Compiled CSS text-align on MDN
See also: text-start , text-right . Source: utilities/_typography.scss:393
uppercase mixin Transforms text to uppercase.
Example
@include uppercase ; // text-transform: uppercase
Compiled CSS text-transform : uppercase ;
text-transform on MDN
See also: lowercase , capitalize , normal-case . Source: utilities/_typography.scss:408
lowercase mixin Transforms text to lowercase.
Example
@include lowercase ; // text-transform: lowercase
Compiled CSS text-transform : lowercase ;
text-transform on MDN
See also: uppercase , normal-case . Source: utilities/_typography.scss:420
capitalize mixin Capitalizes the first letter of each word.
Example
@include capitalize ; // text-transform: capitalize
Compiled CSS text-transform : capitalize ;
text-transform on MDN
See also: uppercase , normal-case . Source: utilities/_typography.scss:432
normal-case mixin Removes any text transform.
Example
@include normal-case ; // text-transform: none
Compiled CSS text-transform on MDN
See also: uppercase , lowercase . Source: utilities/_typography.scss:444
italic mixin Sets the font style to italic.
Example
@include italic ; // font-style: italic
Compiled CSS font-style on MDN
See also: not-italic . Source: utilities/_typography.scss:457
not-italic mixin Resets the font style to normal.
Example
@include not-italic ; // font-style: normal
Compiled CSS font-style on MDN
See also: italic . Source: utilities/_typography.scss:468
underline mixin Underlines text.
Example
@include underline ; // text-decoration: underline
Compiled CSS text-decoration : underline ;
text-decoration on MDN
See also: no-underline , line-through . Source: utilities/_typography.scss:482
line-through mixin Draws a line through text.
Example
@include line-through ; // text-decoration: line-through
Compiled CSS text-decoration : line-through ;
text-decoration on MDN
See also: no-underline . Source: utilities/_typography.scss:493
no-underline mixin Removes text decoration.
Example
@include no-underline ; // text-decoration: none
Compiled CSS text-decoration on MDN
See also: underline . Source: utilities/_typography.scss:504
break-normal mixin Resets overflow-wrap and word-break to normal line breaking.
Example
@include break-normal ; // overflow-wrap: normal; word-break: normal
Compiled CSS See also: break-words , break-all . Source: utilities/_typography.scss:515
break-words mixin Lets long words break onto the next line when they would overflow (overflow-wrap: break-word).
Example
@include break-words ; // overflow-wrap: break-word
Compiled CSS overflow-wrap : break-word ;
overflow-wrap on MDN
See also: break-all , break-normal . Source: utilities/_typography.scss:528
break-all mixin Allows line breaks between any two characters (word-break: break-all).
Example
@include break-all ; // word-break: break-all
Compiled CSS word-break on MDN
See also: break-words , break-normal . Source: utilities/_typography.scss:540
whitespace-normal mixin Sets white-space to normal, collapsing spaces and wrapping lines.
Example
@include whitespace-normal ; // white-space: normal
Compiled CSS white-space on MDN
Source: utilities/_typography.scss:550
whitespace-nowrap mixin Prevents text from wrapping (white-space: nowrap).
Example
@include whitespace-nowrap ; // white-space: nowrap
Compiled CSS white-space on MDN
Source: utilities/_typography.scss:560
whitespace-pre mixin Preserves spaces and line breaks without wrapping (white-space: pre).
Example
@include whitespace-pre ; // white-space: pre
Compiled CSS white-space on MDN
Source: utilities/_typography.scss:570
whitespace-pre-line mixin Collapses spaces but keeps line breaks (white-space: pre-line).
@mixin whitespace-pre-line
Example
@include whitespace-pre-line ; // white-space: pre-line
Compiled CSS white-space on MDN
Source: utilities/_typography.scss:580
whitespace-pre-wrap mixin Preserves spaces and line breaks and wraps lines (white-space: pre-wrap).
@mixin whitespace-pre-wrap
Example
@include whitespace-pre-wrap ; // white-space: pre-wrap
Compiled CSS white-space on MDN
Source: utilities/_typography.scss:590
tracking mixin Sets letter-spacing from a key (tighter, tight, normal, wide, wider, widest; raw em values, not tokens) or a raw value; anything else raises an error.
Parameter Type Default Description $valueString|Number|Length|CalculationRequired Tracking key, 0, a value with a unit (also as a string), calc(), var() or a CSS-wide keyword
Example 1
@include tracking ( wide ) ; // letter-spacing: 0.025em
Compiled CSS Example 2
@include tracking ( 0.2 em ) ; // letter-spacing: 0.2em
Compiled CSS letter-spacing on MDN
See also: tracking-wide , tracking-tight . Source: utilities/_typography.scss:619
tracking-tighter mixin Sets letter-spacing to the tighter key (-0.05em).
Example
@include tracking-tighter ; // letter-spacing: -0.05em
Compiled CSS See also: tracking . Source: utilities/_typography.scss:639
tracking-tight mixin Sets letter-spacing to the tight key (-0.025em).
Example
@include tracking-tight ; // letter-spacing: -0.025em
Compiled CSS letter-spacing : -0.025 em ;
See also: tracking . Source: utilities/_typography.scss:649
tracking-normal mixin Sets letter-spacing to the normal key (0).
Example
@include tracking-normal ; // letter-spacing: 0
Compiled CSS See also: tracking . Source: utilities/_typography.scss:659
tracking-wide mixin Sets letter-spacing to the wide key (0.025em).
Example
@include tracking-wide ; // letter-spacing: 0.025em
Compiled CSS See also: tracking . Source: utilities/_typography.scss:669
tracking-wider mixin Sets letter-spacing to the wider key (0.05em).
Example
@include tracking-wider ; // letter-spacing: 0.05em
Compiled CSS See also: tracking . Source: utilities/_typography.scss:679
tracking-widest mixin Sets letter-spacing to the widest key (0.1em).
Example
@include tracking-widest ; // letter-spacing: 0.1em
Compiled CSS See also: tracking . Source: utilities/_typography.scss:689
responsive-typography mixin Emits the typography utility classes (size, weight, line height, alignment, transform, style, decoration, tracking), suffixed with @breakpoint when a breakpoint is given.
@mixin responsive-typography ( $breakpoint : null )
Parameter Type Default Description $breakpointString|NullnullBreakpoint name for the class suffix (also adds responsive truncate classes); null emits the base classes
Example
@media ( min-width : 1440 px ) {
@include responsive-typography ( wide ) ;
Compiled CSS @media ( min-width : 1440 px ) {
font-size : var ( --wu-font-size-xs );
font-size : var ( --wu-font-size-sm );
font-size : var ( --wu-font-size-md );
font-size : var ( --wu-font-size-base );
font-size : var ( --wu-font-size-lg );
font-size : var ( --wu-font-size-xl );
font-size : var ( --wu-font-size-2xl );
font-size : var ( --wu-font-size-3xl );
font-size : var ( --wu-font-size-4xl );
font-weight : var ( --wu-font-weight-thin );
font-weight : var ( --wu-font-weight-extralight );
font-weight : var ( --wu-font-weight-light );
font-weight : var ( --wu-font-weight-normal );
font-weight : var ( --wu-font-weight-medium );
font-weight : var ( --wu-font-weight-semibold );
font-weight : var ( --wu-font-weight-bold );
font-weight : var ( --wu-font-weight-extrabold );
font-weight : var ( --wu-font-weight-black );
line-height : var ( --wu-line-height-none );
line-height : var ( --wu-line-height-tight );
line-height : var ( --wu-line-height-snug );
line-height : var ( --wu-line-height-normal );
line-height : var ( --wu-line-height-relaxed );
line-height : var ( --wu-line-height-loose );
text-transform : uppercase ;
text-transform : lowercase ;
text-transform : capitalize ;
text-decoration : underline ;
text-decoration : line-through ;
-webkit-box-orient : vertical ;
-webkit-box-orient : vertical ;
-webkit-box-orient : vertical ;
-webkit-box-orient : vertical ;
.tracking-tighter \@ wide {
letter-spacing : -0.025 em ;
Source: utilities/_typography.scss:716