W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [mediaqueries-5] `prefers-contrast: high` media feature doesn't account for macOS and iOS (#2943)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 03 Aug 2020 21:44:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-668256997-1596491063-sysbot+gh@w3.org>
(Jumping back to just answer this one question.)

> Forgive my naivete here (and broadening the scope of the discussion), but is there a reason the group settled on keyword values instead of a numeric system?

In general, MQs aren't well-suited for fine-grained distinctions between values. Responding to an MQ is a fairly "heavyweight" operation generally, and having a lot of potential breakpoints leads authors to either feel like they should be responding to a bunch of points along a gradient (making the author do a lot of likely-unnecessary work), or responding to just a few chosen in an arbitrary way that's not likely to be consistent across sites (bad for the user).

The rare exceptions, like the screen size queries, are reasonable because they correspond directly to things the designer already cares about, *and* are trivially testable by just dragging the window larger/smaller.

But for most things, we serve both the author and the user better by creating a small, opinionated set of values to respond to - it guides the author in how much effort they should put in (one unit of work per value, basically), and gives the user a more consistent treatment across sites, since everyone will be responding to the same single value near the user's actual preference.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 3 August 2020 21:44:26 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC