Contact emails
dgr...@chromium.org,
p...@chromium.org
Explainer
https://github.com/w3c/csswg-drafts/blob/main/css-env-1/explainers/meta-text-scale.md
Specification
https://drafts.csswg.org/css-fonts-5/#text-scale-meta
Summary
Makes the root element's default font size scale in proportion to both the operating system's and browser's text scale setting. This allows pages that follow best practices around font-relative units (i.e. use rem and em for font sizes and page elements that should change with the user's text size preferences) to respect the user's OS-level text scale setting. This also causes the browser to disable existing browser-based mechanisms (i.e. full-page zoom on windows) and heuristics (i.e. text autosizing on mobile). Now web developers can signal to the browser that the page is constructed in a way (i.e. with rem and em) that will scale well across various user-selected font size preferences. Similar to env(preferred-text-scale), which provides authors with a way to access the text scale; this API extends that by enabling scaling via the root element's default font size and opting-out of automatic text scaling.
Blink component
Blink>Accessibility
Web Feature ID
Missing feature
Motivation
Authors currently don't have an easy way to respect the OS-level text scale setting on all devices. It is practically impossible to detect and respect this on desktop. On mobile, there is env(preferred-text-scale), but authors would need to use it in calc() functions to set the root font-size and some media queries. They would need a lot of guidance to ensure it gets used correctly and there would be little variation in how they would use it. Therefore, it would be much easier for authors if they could continue to use font-relative units as they do now and the UA initial font-size was redefined to incorporate the OS-level text scale setting.
Initial public proposal
https://github.com/w3c/csswg-drafts/issues/12380
TAG review
https://github.com/w3ctag/design-reviews/issues/1172
TAG review status
Issues addressed
Risks
Debuggability
No information provided
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
No
Not tested in WPT because there is no API to simulate changing user font size preferences.
The wpt_internal tests are at
https://source.chromium.org/search?q=file:meta&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fwpt_internal%2Fcss%2Fcss-fonts%2F
There are other automated WebView java tests and C++ Unit tests.
Flag name on about://flags
No information provided
Finch feature name
TextScaleMetaTag
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Tracking bug
https://crbug.com/430566925
Measurement
Added WebDX UseCounter in
https://chromium-review.googlesource.com/c/chromium/src/+/7267330
Estimated milestones
| Shipping on desktop | 146 |
| Shipping on Android | 146 |
| Shipping on WebView | 146 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
No information provided
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5112244702674944?gate=5080483318857728
Links to previous Intent discussions
Intent to Prototype:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOZbSt0S4JY2pHY23SVKTFR63Q3ak5Z8RXmqqNhHkXigb2feKw%40mail.gmail.com