← Back to release summary

CSS generic() function

Category
CSS
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

CSS is introducing a new functional syntax for newer generic font families: `generic()`. Instead of adding more bare keywords that might clash with real font names, script-specific generics are written like `generic(fangsong)`, `generic(kai)`, `generic(khmer-mul)`, and `generic(nastaliq)`.

Motivation

CSS has outgrown the original Latin-centric handful of generic font families, but adding more bare keywords to `font-family` is dangerous for web compatibility. The mechanism is very useful, but the original categories don't describe typography well across the world's writing systems. For example, Chinese commonly distinguishes Song, Hei, Kai, and Fangsong styles.

Standards & signals

Ecosystem

View on chromestatus.com