You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-env-1][editorial] Update meta text-scale explainer (w3c#13278)
* Add media queries to meta text-scale explainer
* Add images to illustrate the difference between 'legacy' and 'scale' text scaling.
---------
Co-authored-by: Josh Tumath <josh.tumath@bbc.co.uk>
Copy file name to clipboardExpand all lines: css-env-1/explainers/meta-text-scale.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,8 +143,43 @@ That means:
143
143
144
144
We expect `scale` to become best practice for authors to use on all new website designs, just as they use the viewport meta tag. It allows authors to continue to use font-relative units like `rem` and `em` like they normally would and mostly avoid using `env(preferred-text-scale)`.
145
145
146
+
> [!NOTE]
147
+
> It has been pointed out that these two approaches
148
+
> **currently behave identically** on mobile,
149
+
> though there is a theoretical difference in the specification:
> * **With `<meta>`:** (r)em-based media queries **will include** the OS-level font setting.
166
+
> * **With `:root`:** (r)em-based media queries **will NOT include** the OS-level font setting.
167
+
>
168
+
> *The difference is theoretical because the `env` spec says
169
+
> [`env()` works in media queries](https://drafts.csswg.org/css-env-1/#valdef-env-preferred-text-scale:~:text=Because%20environment%20variables%20don%E2%80%99t%20depend%20on%20the%20value),
_With the meta tag set to <code>scale</code>, when the user increases their OS text scale, the text scales up._
182
+
148
183
This comparison table summarises our proposal. **`legacy`** describes current behavior. **`scale`** represents a simple way for sites to obey the OS-level text settings.
0 commit comments