Re: [csswg-drafts] [mediaqueries] Consider exposing "mobileness" as a media query (#7696)

I think people are getting a bit lost in the theorizing here...

The fact of the matter is, browsers expose a single mobileness bit in their user agent string. People use this to build websites in various ways, including e.g. server rendering. @zcorpan suggests that maybe browsers also control some other things with this single bit. (Which I know to be true in some areas, although I don't know for sure about the cases he mentions, like select menu.)

Maybe they shouldn't use this bit to style websites! In which case the CSSWG can decide not to expose it as a media query. Then people who really want it will just server-render `<html data-mobile="${isUserAgentStringMobile()}">` and use `:root[data-mobile="true"] { ... }` instead of the media query. But maybe this is a legitimate use case!

To recap, we're talking _specifically_ about the existing mobileness bit that user agents _definitely have and already expose through other means_. We're not talking about relitigating the definition of mobileness.

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


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

Received on Wednesday, 7 September 2022 06:25:12 UTC