- From: Chris Moschini <cmoschini@myrealbox.com>
- Date: Fri, 26 Mar 2004 14:07:34 -0500
- To: www-style@w3.org
Christoph Paper: > Good cross-browser, cross-version scripts don't test > for such random things, but for methods they are really > using, like > > if (document.getElementById) Yes, I tried to avoid getting into Javascript too much... I must admit that object-detection is most often the preferred method of determining feature support, rather than user-agent detection. I avoided this mention in part because I cannot presently imagine a good, CSS-consistent syntax for "feature support" that would be comprehensive - and ideas without clear specifics on this list fall dead. However, I am most certainly interested in the discussion. To make things concrete, let's take the typical Box Model IE/everyone else issue. It may be interesting to have a syntax such as: #myDiv { width: 100px; padding: 20px; if( calculated-width != 100px ) width: 80px; } A good CSS3 browser sees the if and does not reset the width, a CSS3 browser with a bad Box Model sees the if and correctly resets the width to fix its own problem, and finally, a browser with no support for the if statement skips it and just does sets the second width. It's very C syntax, but, must we constantly reinvent syntax? And this example has obvious problems - for example, Mozilla and Opera would read this CSS and probably reset the width despite having done things correctly. And some browsers might choke on the if line and never get to the next line, or any after. I would be very interested in a better approach ;o) -Chris "SoopahMan" Moschini http://hiveminds.info/ http://soopahman.com/
Received on Friday, 26 March 2004 14:15:02 UTC