W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: [css3-media-queries] More granular conditional logic

From: Antony Kennedy <antony@silversquid.com>
Date: Thu, 3 Feb 2011 02:35:38 +0000
Cc: www-style list <www-style@w3.org>
Message-Id: <D6FD6E93-73A0-4A2B-8F94-2AB80BA18638@silversquid.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Agree with everything you've said, Boris, thanks.

So, there is no future-proof current feature-detection method that exists (without using JS) or media feature level negation, and they have been proposed in the past. Can someone tell me the reasons these were rejected, or if they are still under consideration?

available:property and unavailable:property seem as good candidates as any. 

On 3 Feb 2011, at 02:04, Boris Zbarsky wrote:

> On 2/2/11 8:57 PM, Antony Kennedy wrote:
>> Which is a shame - because it's the only pure CSS method. Unless you know another?
> 
> There isn't one.  There have been several proposals for
> feature-detection methods in the past, though.
> 
>>> 1)  Can be parsed without knowing anything about this thing you don't support.
>> 
>> Currently, if a media feature is not known, the entire media query evaluates to "not all". This does not seem a very future-proof methodology. It would make more sense for that single media feature to evaluate to zero - i.e. false. Negating that with a local "not" would work well.
> 
> That's not future-proof either.  Say we had this system.  Assume a new
> feature called "interactive" is introduced which is true for interactive
> media.  With your proposal, |not interactive| would test true in all
> existing browsers that haven't been updated to support this feature,
> which seems undesirable (since in fact they _are_ interactive)....
> 
>>> 2)  Is guaranteed to be a boolean support check.
>> 
>> This is true. Perhaps something like:
>> 
>> @media screen and (supports:property)
>> 
>> and
>> 
>> @media screen and (doesnotsupport:property)
>> 
>> …works better?
> 
> I believe that sort of thing has been proposed in the past, yes....
> 
> -Boris
> 
> 
Received on Thursday, 3 February 2011 02:36:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT