- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Wed, 28 Nov 2007 14:04:00 -0800
- To: Brad Kemper <brkemper@comcast.net>
- CC: Alan Gresley <alan1@azzurum.com>, www-style@w3.org
Brad Kemper wrote: > > On Nov 27, 2007, at 10:41 AM, Andrew Fedoniouk wrote: > >>> 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) >> > > It is exactly that word "partially" that makes such a proposal of very > limited use. It might be worthwhile for as far as it goes, but it > doesn't go far enough precisely because of support that is incomplete. > I've mentioned a couple, such as how some values cause changes to the > meaning of z-axis, and some things when gaining dimension cause all > manner of weirdness, including to descendants. For many other places > where support for a particular browser is partial, pay attention to > the yellow rectangles on the following page that compares IE6, IE7, > FireFox 2, and Opera 9: Regarding display:inline-block 1) It makes sense almost only for intrinsically inline elements. 2) IE was the very first UA that implemented them right (if you consider #1) And about supports() function in general: 1) As CSS makes custom keywords perfectly legal then you can do: @media screen and supports(-moz-radius) { } to filter out Mozilla only rules. 2) @ua(name, version) is not practically useful as e.g. Mozilla is publishing new updates pretty frequently. I do not think that you would want to make your CSS look like version tracker or so. 3) CSS3 is now modular - means that modules can be supported by UA selectively. This requires some mechanism that allow to check if module supported or not on CSS level to make all this schema practically useful. That would be a nightmare (precisely: combinatorial explosion ) if you will rely on @ua(name,version) to discover features supported in your style sheets. Andrew Fedoniouk. http://terrainformatica.com
Received on Wednesday, 28 November 2007 22:04:28 UTC