- From: Max Romantschuk <max@provico.fi>
- Date: Thu, 03 Jun 2004 15:35:21 +0300
- Cc: www-style@w3.org
David Balch wrote: > Is it defined how UAs should act when trying to apply CSS styles to invalid > HTML? > > I would expect that there would be no guarantees on how the styles are > applied, all bets are off... As far as I know the specifications do not cover selectors in reference to invalid HTML. I believe most UAs try to match individual selectors to individual elements, so the validity of the document itself is not really that significant. Cascade rules and such would probably be messed up with HTML abuse, but then again most invalid HTML is rendered in quirks mode by the more compliant browsers, and quirks mode compensates for most of the funny stuff. But as you say I believe it's entierly up to the UA. Does it really matter? After all, documents _should_ be valid whenever possible. With invalid CSS it is trickier though. Gecko-derivatives work as intended and ignore invalid rules. IE tries it's best to be smart, which in turn causes a bunch of problems if testing with IE. (stuff works when it shouldn't.) .max -- Max Romantschuk http://max.nma.fi/
Received on Thursday, 3 June 2004 08:35:51 UTC