Code Reference

Typography Properties

CSS · Methods reference

CSS · Methods reference


📋 Overview

Text and font properties for readable UI copy.

🔧 Methods

Font

PropertyDescription
font-familyStack of typefaces
font-sizeLength, %, clamp(), rem preferred
font-weight100–900 or normal/bold
font-stylenormal
font-variant / font-feature-settingsOpenType features
fontShorthand
line-heightLeading — unitless OK
letter-spacing / word-spacingTracking

Text

PropertyDescription
text-alignstart
text-decorationunderline, line-through, color
text-transformuppercase
text-overflowellipsis with overflow hidden
white-spacenowrap
word-break / overflow-wrapWrapping long words
hyphensAuto hyphenation
colorForeground text color

💡 Examples

See parent topic notes for runnable snippets; this page is the complete method index.

⚠️ Pitfalls

  • Mutating methods return None in Python — do not chain sort() / reverse() expecting a new list.
  • Default JS sort() compares strings — pass (a,b) => a-b for numbers.
  • SQL function names differ by dialect — verify Postgres vs MySQL docs.
  • Django QuerySet.update() skips save() signals and auto auto_now fields on models.

On this page