RE: Supports in Media queries

Brad Kemper wrote:

> > [1]
> > [2]

> On Dec 19, 2007, at 3:39 AM, Simon Proctor wrote:
> > One excellent case in point is the recommendations for Multi Column
> > Layout [1] and Grid Positioning [2] by testing for support of the
> > 'columns' property you can write code for user agents that support the
> > first and by testing for 'columns' and 'grid-columns' you can add
> > extra styling for user agents that also support Grid Positioning.
> >
> > Simon Proctor
> > Cognoscite aliquid novum cotidie
> Yes it would. Another example would be RGBa and HSBa. For UAs that  
> didn't support them you could provide a translucent PNG, but you  
> wouldn't want to have both RGBa and translucent PNG mixed together  
> for a double effect.

Brad and Simon

CSS has been designed to allow for the difference in implementation of the CSS specs by the various UA. If a property or value isn't understood by a particular UA this browser will drop that rule block and continue along the cascade (going upwards) and use a property or value that is understood. If a property or value is understood by a UA then the next same property in the cascade will not be used if the selector for the next rule block is of the same specificity. Both Safari 3 and Gecko 1.9 will not apply both the transparent.png and the hsla background color together with the sample CSS shown below. If any future implementation of a UA did show both the transparent.png and the hsla background color together, this UA would not be following the specs. The child selector is used to hide the previous rule block with the transparent.png from IE6 and earlier.

#container {height:100%;width:100%;background: url(transparent.gif)} /* IE6 and earlier */
html>body #container {background: url(transparent.png)} /* most browsers */
html>body #container {background: hsla(90, 50%, 50%, 0.3)} /* Safari 3 and  Gecko 1.9 */


Received on Thursday, 20 December 2007 18:06:34 UTC