W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2011

Tests on interaction with JavaScript needed: cascade, specificity and similia

From: Gabriele Romanato <gabriele.romanato@gmail.com>
Date: Thu, 3 Feb 2011 20:16:56 +0100
Message-Id: <6A32FE64-773C-41F3-B7D2-DFF041AFC290@gmail.com>
To: css test <public-css-testsuite@w3.org>
As a contributor of the W3C CSS test suite, I'm currently keeping an  
eye open on the possible test cases that I encounter during my daily  
work as pro web developer.  In fact, I follow several forums and  
mailing lists where such cases may arise even in uncommon scenarios.

Recently I found some discrepancies between browsers after this post:

http://onwebdev.blogspot.com/2010/12/css-styling-twitter-widget.html

Now, I'm aware of the fact that this is one of the typical real-world  
cases (as Hixie says) where the possible variables are too high in  
number to be reduced to a significant minimal test case, but these  
things happens and, most of all, are not covered by any test and, even  
more, by the CSS specs themselves. CSS implementations and DOM Style  
implementations are two separate fields that, just in theory, should  
not be tested together. But it's also true that JavaScript's ability  
to add or remove styles generates in some cases a kind of  
singularities in the way browsers treat for example cascade and  
specificity.

More specifically, the reader Jasmine found out that my CSS rules used  
to override the Twitter JavaScript styles, didn't work as she expected  
in IE8 (Aaron, no flame intended ;-)). But why? That's a complex  
question. Basically, testing in Chrome, Firefox, Opera and Safari  
returned the same result. So there should be some obscure detail that  
has not been tested here.

And there's also the point of entire DOM structures created on the fly  
and then styled on the fly. That's another point that I find obscure.

Hope I did not get you confused by that.

HTH

Gabriele Romanato



http://www.css-zibaldone.com
http://www.css-zibaldone.com/test/  (English)
http://www.css-zibaldone.com/articles/  (English)
http://onwebdev.blogspot.com/  (English)
Received on Thursday, 3 February 2011 19:17:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 February 2011 19:17:37 GMT