W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2016

Re: [csswg-drafts] [mediaqueries] Consider making device-pixel-ratio a standard alias.

From: Matt Rakow via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Dec 2016 18:51:05 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-265536393-1481136664-sysbot+gh@w3.org>
> I don't think it helps to add (unprefixed) device-pixel-ratio as an 
alias

> I believe there is a compat dependency on 
`-webkit-device-pixel-ratio`

+1 to both of these statements.  We implemented 
`-webkit-device-pixel-ratio` in Edge due to its high usage on the 
mobile web.  While some of those developers also included a 
`device-pixel-ratio` (and a `-moz-device-pixel-ratio`, and a 
`-ms-device-pixel-ratio`, and a `-o-device-pixel-ratio`...), the 
`-webkit-device-pixel-ratio` MQ is the only one actually utilized and 
tested on those sites; the rest are just included as a courtesy.

So adding `device-pixel-ratio` will not improve compat (since no one 
supports it there is nothing to be compatible with) and has risk to 
damage compat if that less-tested path has diverged from the 
`-webkit-device-pixel-ratio` path.

So far I've heard 2 arguments for adding it:

1. David Baron mentioned it's unpleasant to add a `-webkit-` feature 
without adding an equivalent unprefixed version.  In particular citing
 discoverability of the new, recommended approach as his concern.
2. Various people feel the `resolution` MQ is deficient in some way 
(naming, discoverability, etc.).

As a reminder, the proposal on the call was to add 
`device-pixel-ratio` as an alias of `resolution`, NOT as an alias of 
`-webkit-device-pixel-ratio`.  Under that proposal, for 1 I'd argue 
that this wouldn't improve the migration -- authors may initially 
discover the media feature more easily, but the easy conversion of 
dropping the prefix doesn't work.  Under the current proposal, authors
 still must seek out how to migrate away from 
`-webkit-device-pixel-ratio`, it's not self-evident.

For 2, if we're open to alternative names in general, then I'd say 
both `device-pixel-ratio` and `resolution` are pretty bad.  Neither is
 clear about what they represent, leaving the door open for 
ambiguities like whether they're affected by page zoom, pinch zoom, 
etc.  So if it's open season on MQ naming then I think we should try 
to come up with a third, better alternative and deprecate all others.

-- 
GitHub Notification of comment by ChumpChief
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/417#issuecomment-265536393 
using your GitHub account
Received on Wednesday, 7 December 2016 18:51:12 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:26 UTC