Re: [csswg-drafts] [css-fonts][css-viewport] UAs inconsistent in how OS font settings affect the default font-size `medium` (#10674)

I discussed this issue with an author today. The feedback was that she and her team work in `px`, want to continue to work in `px` and, importantly, want to obey the user's system font preferences without spending years tediously converting their existing sites to use a new unit.

Further, some of the team's pages are composed of third-party components over which they have little control. So even in a hypothetical scenario where the team DOES arduously change from using pixels to `uem` AND tediously converts existing content to the new unit… if the sub-content still uses pixels, the page would _partially_ respond to the device font scale, which would look terrible.

She wanted something they could set once that would affect the entire page, like `text-size-adjust: env(system-font-scale)`.

If we ship `uem` as described, I believe it is not possible in CSS to derive a value that can be passed to `text-size-adjust`. We'd be leaving these authors, and subsequently their users, out in the cold.

In addition to shipping `uem`, we should meet authors where they are by _also_ exposing something in env. That would allow authors to do `text-size-adjust: env(something)` to get the desired effect globally.

-- 
GitHub Notification of comment by davidsgrogan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10674#issuecomment-2611300163 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 24 January 2025 00:37:52 UTC