- From: Josh Tumath via GitHub <sysbot+gh@w3.org>
- Date: Tue, 04 Mar 2025 01:23:32 +0000
- To: public-css-archive@w3.org
> This is great! It wasn't completely clear to me if the browser's zoom setting is included in the scale envs though. Is it? If by 'zoom' you mean the text scale, that's not been explicitly defined. It could be down to the user agent. That's why we've gone for the language of _preferred_ text scale. In Firefox for Android, the user can choose whether `font-size: medium` is affected by the user's Android settings or the browser text scaling setting. https://github.com/w3c/csswg-drafts/issues/10674#issuecomment-2605233153 If you do mean 'zoom', that is separate. > Am I correct in thinking: > > 1. That this isn’t defining a new concept, just giving a name for an ancient concept, and allowing it to be used in more places (via this new unit and `env()` variable). > 2. That under this proposal, use of the `em` and `rem` units on the root element’s `font-size`, and in media queries, would now be synonymous with `pem`. No this isn't a new concept, because they aren't affected by the actual default font scale in the OS accessibility settings (except in Firefox for Android). `em` and `rem` on the root are only relative to the computed value of `font-size: medium`. > 3. That this also means the `pem` could vary by document language. (Again, this is part of existing implementations. In Firefox, you can control it by language; bypassing the UI, set pref `font.size.variable.ar` to 10, and `data:text/html,<html lang=ar>…` will have a base font size of 10.) Presumably yes, under the way you've described. But I expect in the spec for `pem` to be computed as: _the computed value of `font-size: medium`_ × _`env(preferred-text-scale)`_ So any variations based on language would be because the computed value of `font-size: medium` is different, rather than because of a special feature of `pem` units. 🙂 -- GitHub Notification of comment by JoshTumath Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10674#issuecomment-2695942277 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 4 March 2025 01:23:33 UTC