Typography Properties
CSS · Methods reference
CSS · Methods reference
📋 Overview
Text and font properties for readable UI copy.
🔧 Methods
Font
| Property | Description |
|---|---|
font-family | Stack of typefaces |
font-size | Length, %, clamp(), rem preferred |
font-weight | 100–900 or normal/bold |
font-style | normal |
font-variant / font-feature-settings | OpenType features |
font | Shorthand |
line-height | Leading — unitless OK |
letter-spacing / word-spacing | Tracking |
Text
| Property | Description |
|---|---|
text-align | start |
text-decoration | underline, line-through, color |
text-transform | uppercase |
text-overflow | ellipsis with overflow hidden |
white-space | nowrap |
word-break / overflow-wrap | Wrapping long words |
hyphens | Auto hyphenation |
color | Foreground text color |
💡 Examples
See parent topic notes for runnable snippets; this page is the complete method index.
⚠️ Pitfalls
- Mutating methods return
Nonein Python — do not chainsort()/reverse()expecting a new list. - Default JS
sort()compares strings — pass(a,b) => a-bfor numbers. - SQL function names differ by dialect — verify Postgres vs MySQL docs.
- Django
QuerySet.update()skipssave()signals and autoauto_nowfields on models.