Modern CSS features like :heading(), sibling-index(), and pow() enable mathematical typographic scales with minimal code. Instead of manually declaring font sizes for each heading level, you can define a base size and ratio once, then let CSS calculate exponential scales automatically. The approach supports multiple scale ratios (Minor Third, Perfect Fourth, etc.), responsive adjustments across viewports, and global theming through custom properties. Currently only Safari Technology Preview supports all three features, but this represents a shift toward expressing design systems as mathematical relationships rather than exhaustive declarations.
Table of contents
The Problem with Traditional Typographic ScalesUnderstanding Typographic ScalesEnter pow(): Exponentiation in CSSThe Missing Piece: sibling-index()Putting It All TogetherBuilding a Complete Scale SystemResponsive TypographyPractical Example: A Complete Design SystemWhy This MattersBrowser Support and TestingWrapping UpSort: