Re: Proposal of @ua

Brad Kemper wrote:
> .....
> Sort of. Actually, I was suggesting that it be a media query instead, 
> and I gave examples of doing so in a non-exclusionary manner (which is 
> part of what would make it a good example), so that it would only be 
> used where needed to address known issues where a particular rendering 
> engine could not adequately handle the CSS presented to other 
> browsers. In other words, in places where CSS hacks are used today, 
> such as where you used one for IE7.
>
> So, in theory, if IE8 came out and you still needed the hack but they 
> had fixed the selector bug, then instead of this:
>
> *:first-child+html a.exlink {display:inline-block;}
>
> you would be able to apply the same line of code like this (if IE8 
> supported this sort of media query):
>
> @media screen and (renderer:Trident) {
>  a.exlink {display:inline-block;}
> }
I suggest to add support(attribute[,value]) function instead.

So this:

@media screen and has(renderer:Trident)
{
    a.exlink {display:inline-block;}
}

can be rewritten as

@media screen and support( display, inline-block  )
{
    a.exlink {display:inline-block;}
}
@else
{
    a.exlink {display:block; }
}

This construction will match IE6, IE7, Opera but not FF2 as IE and Opera 
do have support of inline-block.
(IE supports it partially, only for <span> alike elements, but still)

I believe that modular architecture of CSS3 implies that UA may support 
CSS3 partially - on per-module basis at least. Thus support() may help 
web technologies to evolve gradually and more rapidly than now.

Andrew Fedoniouk
http://terrainformatica.com

Received on Tuesday, 27 November 2007 18:41:45 UTC