Re: [CSS] Extending media queries

On Feb 17, 2009, at 3:57 PM, Germain Garand <germain@ebooksfrance.org>  
wrote:

> Le mardi 17 février 2009, François REMY a écrit :
>
>> How can I do to know if the browser that read my page support box- 
>> shadow ?
>>
>> With my proposal, it's simple :
>> @media (implements: box-shadow) { ... }
>> @media !(implements: box-shadow) and (implements: border-image)  
>> { ...}
>
> Remember that media queries are about describing the output device,  
> not about
> the user agent.

The user agent is typically part of the software, but the software is  
part of the device. Take 'color' for instance. Most monitors support  
millions of colors these days, but it is the OS control panel (e.g. on  
Windows or Mac) that determines if the UA will report millions or 256.

Besides that, features like 'width' are determined almost entirely by  
the software under user control, and can be greater than the device  
width.

> But anyway, like all User Agent detection schemes, it will be abused  
> to
> provide selective support, undermining CSS's graceful fallback on a  
> global
> scale:
>
> @agent (implements: -ozm-proprietary-property) { @import ... }
> @agent (implements: -bzo-proprietary-property) { @import ... }
> /* sorry, you are out of luck, welcome to the wonders of unstyled  
> content */

I'm sorry, but you can do exactly the same sort of thing with media  
queries as is. For instance, you can have '@media screen and (max- 
width:700) {...}' and watch as all your styling disapears when the  
window is stretched to over 700 pixels wide.

"With great power comes great responsibility." --Ben Parker (Peter's  
uncle)

>
>
> this should not be encouraged or made easy..
>
> Greetings,
> Germain
>
>

Received on Wednesday, 18 February 2009 02:15:03 UTC