Re: [csswg-drafts] [css-fonts] Proposal to extend CSS font-optical-sizing (#4430)

@fantasai I agree, the proposal is improved if it allows `px` and `pt`. Are you suggesting something other than a `<length>`? I think @Crissov was the first to suggest that last year [here](#issuecomment-543306648), and it seemed reasonable to me, so percentages, floats, and lengths, all fine, and each with a use case to make it seem the most useful.

Perhaps we are beyond the possibility of reassigning the default ratio, but I can see authors defaulting to `font-optical-sizing: 1pt` in their own stylesheets. If they are obsessive about optical size per device, then they can make media queries or check User-Agent. If they want to adjust `opsz` in the hope that it improves accessibility, i.e. _reduce_ `opsz`, then they can _increase_ `font-optical-sizing` to `2`, `2px` or `2pt` or whatever makes sense for them.

There’s one category of authors who still won’t be satisfied, and that’s those who want to choose a specific `opsz` whatever the font size. Under any version of this proposal so far they are out of luck and have to resort to `font-variation-settings`, with the big downsides of non-inheritability without affecting other axes (notwithstanding the [custom properties hack](https://pixelambacht.nl/2019/fixing-variable-font-inheritance/) published by @RoelN). I believe this use case is significant, especially as fonts with an `opsz` axis are unfamiliar to many authors, some of whom will be pleased to “fix” fonts at a certain `opsz` to avoid surprises when resizing a widget, for example. Font makers need an easy answer for such customers.

So, assuming `<length>`, `<number` and `<percentage>` are acceptable values as well as `auto` and `none`, perhaps we can allow `opsz` as a keyword in the form of "`<number> opsz`" to fix optical size at that axis value, inheritably.

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


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

Received on Wednesday, 16 September 2020 18:09:59 UTC