Re: [csswg-drafts] [css-fonts] `system-ui` behavior is undesired for some users (#3658)

I say there are two problems here:

- Developers are widely using `system-ui` as a proxy for (subjectively) prettier `sans-serif`, and then getting bitten by the fact that `system-ui` has different *semantics*, and those semantics make it very undesirable for some users. Probably the best solution here is for browsers to update their default sans-serifs to these prettier fonts, and then encourage web developers to go back to just `sans-serif`, and then dissuade developers from using `system-ui` unless that’s *actually* what they want semantically (which it seldom is in online content—I see `system-ui` as being about as niche as system *colours*: useful for installed apps, but almost without valid use on online content).

- `system-ui` interacts poorly with localisation. `sans-serif` is generally implemented as a composite font, resolving to various different fonts for different languages, but I believe (without verifying it) that `system-ui` is *in practice* always implemented as a single font, because that’s how all the main operating systems model it. Thus, `system-ui` is only suitable for use with content that matches the system language (which is something online content fundamentally cannot verify, thus making it presently universally unsuitable for online content except by user opt-in), and you may get unpleasant results if you use it with a different language. But it’s not clear that this should be changed, once you acknowledge that the widespread use of `system-ui` has been almost entirely *ab*use.

So my actual proposal here is:

1. Update non-normative text in the spec to discourage the use of `system-ui` for online content, with explanation;
2. Work with browser makers to improve the fonts `sans-serif` resolves to (so that web developers don’t feel the need to go beyond it);
3. When all this is done, evangelise collapsing the teetering piles of system font stacks down to `sans-serif`. Just `sans-serif` and *nothing* else.

One small part of this is in scope for CSSWG, the rest is largely up to browser makers.

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


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

Received on Thursday, 13 October 2022 17:23:56 UTC