meta name="text-scale" demo

Back to overview

<meta name="text-scale" content="scale"> makes the browser's initial font size respond to the OS text scale setting. This page has content="scale" enabled.

Usage

<meta name="text-scale" content="scale">

This is equivalent to:

:root {
  font-size: calc(100% * env(preferred-text-scale, 1));
}

Possible values

Demo

This entire page responds to your OS text scale setting because content="scale" is set.

All text on this page, including this box, will scale with your OS setting.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Compare this page with the env() demo, which pins the page to px and scales only one box with env().

Testing

On desktop, emulate the OS text scale from DevTools (the --blink-settings=accessibilityFontScaleFactor flag had no effect in Chrome 157 Canary on macOS):

  1. DevTools Settings → Experiments → enable "Protocol Monitor", then reload DevTools.
  2. Open it with "Show Protocol monitor" from the command menu (Cmd/Ctrl + Shift + P).
  3. Send Emulation.setEmulatedOSTextScale with {"scale": 2}, then reload the page.

This is a demo for <meta name="text-scale">

Try it in Chrome 139+.