Closed Bug 75374 Opened 20 years ago Closed 9 years ago
add support for pseudo-classes accepting argument(s)
In CSS 3, several pseudo-classes accept one or more arguments : :lang() argument is a language keyword or string :nth-child() argument is a keyword or an+b where a and b signed integers :nth-last-child() idem :nth-of-type() idem :nth-last-of-type() idem :contains() argument is a keyword or a string :not() argument is a simple selector The goal of this RFE is to provide a common ground layer for all these pseudo-classes.
WORK IN PROGRESS : patch showing a way to add support for pseudo-classes with arguments. I did not try to optimize for the moment so all your suggestions and comments are **highly** welcome. Just an extra note : I have used this code for all :nth-*() pseudos w/o problem.
setting this out to future to get it off the un-milestoned list, moving it back to the appropriate milestone when you are ready.
Priority: -- → P4
Target Milestone: --- → Future
Daniel: what's the status of this, could you try to get this and the other patch ( bug 75375 ) done?
Just in (an unlikely) case it's overlooked, :lang pseudo-class accepts an argument in CSS2 as well as in CSS3. A couple of simple test pages are put up at http://jshin.net/moztest/lang.pseudo.html and http://jshin.net/moztest/lang.pseudo2.html
Summary: [CSS] RFE : add support for pseudo-classes accepting argument(s) → add support for pseudo-classes accepting argument(s)
Without looking at code for this I think we now support this ability... Thought taken from the :lang testsuite test for CSS3 Selectors: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20040510/html/tests/css3-modsel-22.html Leaving as Assigned since I have no code-knowledge in this area
In addition to 'lang()', 'not()' also works rather well. Among test cases listed at http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20040510/html/tests/ , tests #54 through #72b work fine. Can anyone identify which checkin(s) fixed this? If it's done in a generic manner so as to satisfy the goal mentioned in comment #0, this should be closed, shouldn't it? (and we have to move on to fixing bug 75375)
Sorry for spam. 'not()' support had been added before this bug was filed (bug 71647). So, it seems like we still don't have a generic frame work set as the goal of this bug in comment #0. Or, we may have it but in a different way.
Apart from :contains() which was removed from the spec Gecko now supports all the selectors listed in the initial comment. --> FIXED?
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.