From 8d5f5e2f21ef13b8684a5c1337cc598401f2e170 Mon Sep 17 00:00:00 2001 From: David Grogan Date: Sun, 2 Nov 2025 11:21:11 -0600 Subject: [PATCH 1/9] no bs edits --- css-fonts-5/Overview.bs | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 026a8b54deaa..c4dcafdd6d54 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -59,7 +59,64 @@ rules defined in CSS Fonts Level 4. This specification is currently a delta to the CSS Fonts Level 4 specification. Do not assume that if something is not here, it has been dropped. +

+Text-Scale <meta> element

+A document with a <meta> tag whose name attribute +is a ASCII case-insensitive match for +"text-scale" is recognized as setting the +initial font size of the document. The value of the content +attribute must be an ASCII case-insensitive match for one of the +recognized keywords. + +Documents without this <meta> tag will have an assumed default +value of legacy. + +

+Keywords

+ +The recognized keywords in the [=text-scale=] +<meta> element are: + + + +

The 'legacy' keyword

+ +The legacy property is +recognized in the [=text-scale=] content attribute value. + +When the value of the [=text-scale=] content attribute is +legacy the user agent should set the initial font size +to 16px multiplied by the font scale factor the user has chosen from any settings provided by the user agent. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile: + + +Note: As of this writing, all combinations of Android, iOS, Gecko, WebKit, Blink qualify for the first bullet point above. + +

The 'scale' keyword

+ +The scale property is +recognized in the [=text-scale=] content attribute value. + +When the value of the [=text-scale=] content attribute is +scale the user agent may determine the initial font size +based on a combination of the operating system's text scale setting and the user agent's text scale setting. The +''env()/preferred-text-scale'' value must be a number that, when multiplied by +16px, provides a <> that matches that of the initial font size. + +Further, when the value of the [=text-scale=] content attribute is +scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-page zoom (popular browsers do this on Windows). + +See the +preferred text scale explainer for more details. + +Note: It is expected that authors will use +''<meta name="text-scale" content="scale">'' in stylesheets so that the initial font size will reflect an amalgam of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences.

Value Definitions

From 18f2f8b4e615eceb7d9bfaebad236158ddeebbbe Mon Sep 17 00:00:00 2001 From: David Grogan Date: Tue, 4 Nov 2025 14:59:06 -0800 Subject: [PATCH 2/9] Small revisions --- css-fonts-5/Overview.bs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index c4dcafdd6d54..3ed32ea5eeb8 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -92,12 +92,14 @@ When the value of the [=text-scale=] content attribute is legacy the user agent should set the initial font size to 16px multiplied by the font scale factor the user has chosen from any settings provided by the user agent. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile:
    -
  • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the mulitplier that the user has chosen in the operating system's text scale setting.
  • +
  • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the mulitplier that the user has chosen in the operating system's text scale setting. + + Note: As of this writing, all combinations of Android, iOS, Gecko, WebKit, Blink satisfy this first condition. + +
  • Otherwise ''env()/preferred-text-scale'' returns 1.
-Note: As of this writing, all combinations of Android, iOS, Gecko, WebKit, Blink qualify for the first bullet point above. -

The 'scale' keyword

The scale property is @@ -110,13 +112,10 @@ based on a combination of the operating system's text scale setting and the user 16px, provides a <> that matches that of the initial font size. Further, when the value of the [=text-scale=] content attribute is -scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-page zoom (popular browsers do this on Windows). - -See the -preferred text scale explainer for more details. +scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-application zoom (popular browsers do this on Windows). Note: It is expected that authors will use -''<meta name="text-scale" content="scale">'' in stylesheets so that the initial font size will reflect an amalgam of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences. +''<meta name="text-scale" content="scale">'' in stylesheets so that the initial font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences.

Value Definitions

From b729d74a5fdb81c36ac3a0effeead22e6d37fdcb Mon Sep 17 00:00:00 2001 From: David Grogan Date: Wed, 5 Nov 2025 15:06:53 -0800 Subject: [PATCH 3/9] after review round 1 --- css-fonts-5/Overview.bs | 54 ++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 3ed32ea5eeb8..4536cde63a37 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -25,6 +25,7 @@ spec:css-color-4; type:property; text:color spec:css-values; type:value; text:ex spec:css22; type:value; for:/; text:block spec:html; type:element; text:font +spec:html; type:element; text:meta spec:css-fonts-4; type:property; text:font-size spec:css-fonts-4; type:descriptor; text:font-language-override spec:css-fonts-4; type:property; text:font-family @@ -62,12 +63,17 @@ Do not assume that if something is not here, it has been dropped.

Text-Scale <meta> element

-A document with a <meta> tag whose name attribute +A document with a <{meta}> tag +whose name attribute is a ASCII case-insensitive match for -"text-scale" is recognized as setting the -initial font size of the document. The value of the content +"text-scale" +is recognized as setting the computed value +of the ''font-size/medium'' font size +and consequently scaling the computed size of the other <> keywords. + +The value of the content attribute must be an ASCII case-insensitive match for one of the -recognized keywords. +recognized keywords. Otherwise the tag is ignored. Documents without this <meta> tag will have an assumed default value of legacy. @@ -76,21 +82,29 @@ value of legacy. Keywords The recognized keywords in the [=text-scale=] -<meta> element are: - -
    -
  • legacy
  • -
  • scale
  • -
+<{meta}> element are: + +
+
legacy
+
''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile, + but 1 on desktop. + The document's initial font size only incorporates UA-level font preferences. + OS-level font preferences are ignored.
+
scale
+
''env()/preferred-text-scale'' returns the user's OS-level font preferences. + The document's initial font size incorporates both UA-level and OS-level font preferences.
+

The 'legacy' keyword

-The legacy property is -recognized in the [=text-scale=] content attribute value. - When the value of the [=text-scale=] content attribute is -legacy the user agent should set the initial font size -to 16px multiplied by the font scale factor the user has chosen from any settings provided by the user agent. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile: +[=text-scale/legacy=] +the user agent must set the computed ''font-size/medium'' font size +to 16px multiplied by +the font scale factor +the user has chosen from any settings provided by the user agent. +The ''preferred-text-scale'' value must be 1 on desktop platforms. +On mobile:
  • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the mulitplier that the user has chosen in the operating system's text scale setting. @@ -106,10 +120,12 @@ The scale property is recognized in the [=text-scale=] content attribute value. When the value of the [=text-scale=] content attribute is -scale the user agent may determine the initial font size -based on a combination of the operating system's text scale setting and the user agent's text scale setting. The -''env()/preferred-text-scale'' value must be a number that, when multiplied by -16px, provides a <> that matches that of the initial font size. +scale +computed ''font-size/medium'' font size must match the user's preferred paragraph text size as determined from a combination of OS and UA preferences. + +The ''env()/preferred-text-scale'' value must be a number that, +when multiplied by 16px, +provides a <> that matches that of the initial font size. Further, when the value of the [=text-scale=] content attribute is scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-application zoom (popular browsers do this on Windows). From 0206973f173ed1def5e30abe40730b608c717248 Mon Sep 17 00:00:00 2001 From: davidsgrogan Date: Sat, 8 Nov 2025 20:28:22 -0800 Subject: [PATCH 4/9] Apply suggestions from code review Co-authored-by: Josh Tumath --- css-fonts-5/Overview.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 4536cde63a37..826c1784cce7 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -85,7 +85,7 @@ The recognized keywords in the [=text-scale=] <{meta}> element are:
    -
    legacy
    +
    legacy
    ''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile, but 1 on desktop. The document's initial font size only incorporates UA-level font preferences. @@ -106,7 +106,7 @@ the user has chosen from any settings provided by the user agent. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile:
      -
    • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the mulitplier that the user has chosen in the operating system's text scale setting. +
    • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the multiplier that the user has chosen in the operating system's text scale setting. Note: As of this writing, all combinations of Android, iOS, Gecko, WebKit, Blink satisfy this first condition. From c287984e222a6ce184eb937b77856a62192d1e30 Mon Sep 17 00:00:00 2001 From: David Grogan Date: Wed, 12 Nov 2025 15:49:09 -0800 Subject: [PATCH 5/9] Josh's suggestions from review round 1 - Sentence about >1 meta tag - s/medium/initial/g - earlier example --- css-fonts-5/Overview.bs | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 826c1784cce7..10919be66f5f 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -64,7 +64,7 @@ Do not assume that if something is not here, it has been dropped. Text-Scale <meta> element A document with a <{meta}> tag -whose name attribute +whose <{meta/name}> attribute is a ASCII case-insensitive match for "text-scale" is recognized as setting the computed value @@ -75,9 +75,15 @@ The value of the content attribute must be an ASCII case-insensitive match for one of the recognized keywords. Otherwise the tag is ignored. -Documents without this <meta> tag will have an assumed default +Documents without this <{meta}> tag will have an assumed default value of legacy. +
      +
      <meta name="text-scale" content="scale" />
      +
      + +There must not be more than one <{meta}> element with its <{meta/name}> attribute value set to an [=ASCII case-insensitive=] for [=text-scale=] per document. +

      Keywords

      @@ -88,11 +94,15 @@ The recognized keywords in the [=text-scale=]
      legacy
      ''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile, but 1 on desktop. - The document's initial font size only incorporates UA-level font preferences. - OS-level font preferences are ignored.
      + The document's ''font-size/medium'' font size incorporates UA-level font preferences. + OS-level font preferences are ignored. + + Note: Equivalent to omitting a [=text-scale=] <{meta}> tag or + including an unrecognized content attribute keyword. +
    scale
    ''env()/preferred-text-scale'' returns the user's OS-level font preferences. - The document's initial font size incorporates both UA-level and OS-level font preferences.
    + The document's ''font-size/medium'' font size incorporates both UA-level and OS-level font preferences.

    The 'legacy' keyword

    @@ -106,9 +116,15 @@ the user has chosen from any settings provided by the user agent. The ''preferred-text-scale'' value must be 1 on desktop platforms. On mobile:
      -
    • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the initial font size, ''env()/preferred-text-scale'' returns the multiplier that the user has chosen in the operating system's text scale setting. +
    • if the operating system provides a text scale setting AND + the UA hasn't already applied that factor to the ''font-size/medium'' font size, + ''env()/preferred-text-scale'' returns the multiplier + that the user has chosen in the operating system's text scale setting. - Note: As of this writing, all combinations of Android, iOS, Gecko, WebKit, Blink satisfy this first condition. + Note: At the time of publishing, all combinations of + Android, iOS, + Gecko, WebKit, Blink + satisfy this first condition.
    • Otherwise ''env()/preferred-text-scale'' returns 1.
    • @@ -125,13 +141,13 @@ computed ''font-size/medium'' font size must match the user's preferred paragrap The ''env()/preferred-text-scale'' value must be a number that, when multiplied by 16px, -provides a <> that matches that of the initial font size. +provides a <> that matches that of the ''font-size/medium'' font size. Further, when the value of the [=text-scale=] content attribute is scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-application zoom (popular browsers do this on Windows). -Note: It is expected that authors will use -''<meta name="text-scale" content="scale">'' in stylesheets so that the initial font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences. +Note: Authors are expected to use +''<meta name="text-scale" content="scale">'' in stylesheets so that the ''font-size/medium'' font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences.

      Value Definitions

      From f6d1a0ccbe54dbeaecaf63aaee59e5e62f132fd5 Mon Sep 17 00:00:00 2001 From: David Grogan Date: Thu, 13 Nov 2025 22:00:41 -0800 Subject: [PATCH 6/9] full example --- css-fonts-5/Overview.bs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 10919be66f5f..2b0a2221e588 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -79,7 +79,7 @@ Documents without this <{meta}> tag will have an assumed default value of legacy.
      -
      <meta name="text-scale" content="scale" />
      +
      <meta name="text-scale" content="scale" />
      There must not be more than one <{meta}> element with its <{meta/name}> attribute value set to an [=ASCII case-insensitive=] for [=text-scale=] per document. @@ -149,6 +149,31 @@ Further, when the value of the [=text-scale=] content attribute is Note: Authors are expected to use ''<meta name="text-scale" content="scale">'' in stylesheets so that the ''font-size/medium'' font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences. +
      + If authors don't alter the '':root'' font size, content sized with ''rem'' units will be relative to the preferred text scale +
      +<!DOCTYPE html>
      +<html> <!-- leave this element's font-size as the default -->
      +	<head>
      +		<meta name="text-scale" content="scale" />
      +	</head>
      +	<body>
      +		<div style="font-size: 1rem;">
      +		  This font size obeys the user's font preferences, **whether
      +			those preferences are specified at the operating system level
      +			or the user agent level**
      +		</div>
      +		<div style="font-size: 20px;">
      +		  This font size does NOT respect the user's font preferences.
      +			<div style="font-size: 1rem;">
      +			  But this font size does!
      +			</div>
      +		</div>
      +	</body>
      +</html>
      +	
      +
      +

      Value Definitions

      From 3716341bbb78d72f0ce08c7524e5c14e4ffb302e Mon Sep 17 00:00:00 2001 From: David Grogan Date: Fri, 14 Nov 2025 14:17:57 -0800 Subject: [PATCH 7/9] add 'environment variable' following ''preferred-text-scale'' --- css-fonts-5/Overview.bs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 2b0a2221e588..3d6cd6b4ba7c 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -92,7 +92,7 @@ The recognized keywords in the [=text-scale=]
      legacy
      -
      ''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile, +
      The ''env()/preferred-text-scale'' environment variable returns the user's OS-level font factor on mobile, but 1 on desktop. The document's ''font-size/medium'' font size incorporates UA-level font preferences. OS-level font preferences are ignored. @@ -101,7 +101,7 @@ The recognized keywords in the [=text-scale=] including an unrecognized content attribute keyword.
      scale
      -
      ''env()/preferred-text-scale'' returns the user's OS-level font preferences. +
      The ''env()/preferred-text-scale'' environment variable returns the user's OS-level font preferences. The document's ''font-size/medium'' font size incorporates both UA-level and OS-level font preferences.
      @@ -113,21 +113,21 @@ the user agent must set the computed ''font-size/medium'' font size to 16px multiplied by the font scale factor the user has chosen from any settings provided by the user agent. -The ''preferred-text-scale'' value must be 1 on desktop platforms. +The ''preferred-text-scale'' environment variable value must be 1 on desktop platforms. On mobile:
      • if the operating system provides a text scale setting AND the UA hasn't already applied that factor to the ''font-size/medium'' font size, - ''env()/preferred-text-scale'' returns the multiplier + the ''env()/preferred-text-scale'' environment variable returns the multiplier that the user has chosen in the operating system's text scale setting. Note: At the time of publishing, all combinations of Android, iOS, - Gecko, WebKit, Blink + Firefox, Safari, Chrome satisfy this first condition.
      • -
      • Otherwise ''env()/preferred-text-scale'' returns 1.
      • +
      • Otherwise the ''env()/preferred-text-scale'' environment variable returns 1.

      The 'scale' keyword

      @@ -139,7 +139,7 @@ When the value of the [=text-scale=] content attribute is scale computed ''font-size/medium'' font size must match the user's preferred paragraph text size as determined from a combination of OS and UA preferences. -The ''env()/preferred-text-scale'' value must be a number that, +The ''env()/preferred-text-scale'' environment variable must return a number that, when multiplied by 16px, provides a <> that matches that of the ''font-size/medium'' font size. From 828b01eb1107fac2709167f113638ce9b1fa6668 Mon Sep 17 00:00:00 2001 From: David Grogan Date: Sat, 22 Nov 2025 02:44:58 -0800 Subject: [PATCH 8/9] put Value Definitions back in the right place --- css-fonts-5/Overview.bs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 3d6cd6b4ba7c..029f8bc2f237 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -60,6 +60,19 @@ rules defined in CSS Fonts Level 4. This specification is currently a delta to the CSS Fonts Level 4 specification. Do not assume that if something is not here, it has been dropped. +

      +Value Definitions

      + +This specification follows the CSS property definition conventions from [[!CSS2]] +using the value definition syntax from [[!CSS-VALUES-3]]. +Value types not defined in this specification are defined in CSS Values & Units [[!CSS-VALUES-3]]. +Combination with other CSS modules may expand the definitions of these value types. + +In addition to the property-specific values listed in their definitions, +all properties defined in this specification +also accept the CSS-wide keywords as their property value. +For readability they have not been repeated explicitly. +

      Text-Scale <meta> element

      @@ -174,19 +187,6 @@ Note: Authors are expected to use -

      -Value Definitions

      - -This specification follows the CSS property definition conventions from [[!CSS2]] -using the value definition syntax from [[!CSS-VALUES-3]]. -Value types not defined in this specification are defined in CSS Values & Units [[!CSS-VALUES-3]]. -Combination with other CSS modules may expand the definitions of these value types. - -In addition to the property-specific values listed in their definitions, -all properties defined in this specification -also accept the CSS-wide keywords as their property value. -For readability they have not been repeated explicitly. -

      Basic Font Properties

      From 65d7813eaa31a63248396ead5bf7a53460584441 Mon Sep 17 00:00:00 2001 From: David Grogan Date: Sat, 22 Nov 2025 02:50:36 -0800 Subject: [PATCH 9/9] add link to scaling rate issue --- css-fonts-5/Overview.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 029f8bc2f237..18278f079276 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -84,6 +84,8 @@ is recognized as setting the computed value of the ''font-size/medium'' font size and consequently scaling the computed size of the other <> keywords. +Issue(12475): + The value of the content attribute must be an ASCII case-insensitive match for one of the recognized keywords. Otherwise the tag is ignored.