CSS3 Selectors
Sunday, March 27th, 2005Recently, i continued porting the DENG1 CSS parser to ECMAScript 4, and making it fully compliant to the CSS 3 specification. The current AS1 version of the parser already has many CSS 3 features implemented, but not all of them (like the nth-child(), nth-last-child(), nth-of-type() and nth-last-of-type() pseudo classes for example, that required a special type of argument that wasn’t supported by the parser yet). Part of the work was commenting changes in the grammar, to know what was added or changed from the CSS 2.1 grammar, and to verify if the existing code fully conforms to the CSS 3 grammar. I figured this might be an interesting read for some of you, so here it is…