← Back to release summary

CSS env variable for OS-level font scale

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Exposes a user's preferred font scale to CSS. Currently, it is not practical for a page to detect if the user has changed their preferred font size via the Operating System's preferences. This CSS environment variable will reflect the scale chosen by the user.

Motivation

Without this API, pages cannot practically honor the user's OS-level font-size preference. Today, if you change the Android system-level font slider and browse the web you'll see that <10% of sites honor that slider. The minority that do change font sizes have mostly stumbled into a very old UA intervention that boosts font sizes on mobile.

Standards & signals

Explainers: https://github.com/w3c/csswg-drafts/blob/main/css-env-1/explainers/env-preferred-text-scale.md

View on chromestatus.com