Closed Bug 75374 Opened 24 years ago Closed 13 years ago

add support for pseudo-classes accepting argument(s)

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: glazou, Assigned: glazou)

References

(Blocks 1 open bug)

Details

(Keywords: css2, css3, Whiteboard: [Hixie-PF])

Attachments

(1 file)

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.
Status: NEW → ASSIGNED
code level bug, qa->engineer
Keywords: css2, css3
QA Contact: ian → attinasi
Whiteboard: [Hixie-PF]
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
Depends on: 221981
Blocks: 221981
No longer depends on: 221981
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. 
QA Contact: attinasi → style-system
Apart from :contains() which was removed from the spec Gecko now supports all the selectors listed in the initial comment. --> FIXED?
Yeah.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: