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

> I honestly think making authors write
> 
> ```
> @media (min-width: calc(env(system-font-size) * 40)) { ... }
> ```
> 
> where they currently write
> 
> ```
> @media (min-width: 40em) { ... }
> ```
> 
> is pretty awful and we should try to come up with a better solution.

Yeah I agree. I wasn't sure if there was prior consensus in the CSSWG to use `env()` vars more often.

> Is it time for a new unit? `1uf` = 1 increment of the user font size? ”Forreals this time”?

Oooh, you could potentially extend that to all [font relative length properties.](https://drafts.csswg.org/css-values-4/#font-relative-lengths)

* `uem`
* `uex`
* `ucap`
* `uch`
* `uic`

That would certainly be a more workable solution.

As the next CSSWG meeting is in 15 minutes, perhaps we can discuss if having an `env()` var for the system font size is still useful, and consider if we also need an alternative solution such as this.

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


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

Received on Wednesday, 18 December 2024 16:47:08 UTC