[sIFR3-dev] New selector parser

Mark Wubben mark at novemberborn.net
Sun Jan 15 22:34:15 GMT 2006


Hi,

Next up on the list: improving the code which handles the parsing of  
the selectors (also know as the `parseSelector()`) method. I've  
completely rewritten it and made it extensible, we should now be able  
to support all CSS 2 and CSS 3 selectors!

Question is, of course, do we want to? Currently the following  
selectors are supported by default :
* ' ' (whitespace, or descendant selector)
* > (child selector)
* . (class selector, also supports multiple classes)
* # (id selector)

Which selectors do you think should be included by default? You can  
find a good list about the options at 456 Berea Street:
* <http://www.456bereastreet.com/archive/200509/ 
css_21_selectors_part_1/>
* <http://www.456bereastreet.com/archive/200510/ 
css_21_selectors_part_2/>
* <http://www.456bereastreet.com/archive/200510/ 
css_21_selectors_part_3/>
* <http://www.456bereastreet.com/archive/200601/ 
css_3_selectors_explained/>

I've tested the code by duplicating the official W3C tests [1]. You  
can find the tests at <http://dev.novemberborn.net/parseselector/svn/ 
test/unit/parseSelector.html>. Please let me know how they perform.

Kind regards,

[1]: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/ 
index.html

--
Mark Wubben
http://novemberborn.net/





More information about the sifr3-dev mailing list