Skip to main content

Bug Tracker

Side navigation

#11252 closed bug (fixed)

Opened January 29, 2012 04:21AM UTC

Closed March 10, 2012 01:57PM UTC

Last modified April 12, 2012 09:58PM UTC

:even and :odd selectors documentation does not specify which order is considered

Reported by: Chealer Owned by: Chealer
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

The documentation for the :even and :odd selectors is very similar. :even's reads:

Description: Selects even elements, zero-indexed. See also odd.

There is no explanation of what is called an "even element" or an "odd element" or of which index is referred to. The examples do not make it very clear.

One possibility which would agree with the examples is that the order considered is the order of elements matched by the modified selector.

Attachments (0)
Change History (6)

Changed January 29, 2012 04:26AM UTC by dmethvin comment:1

owner: → Chealer
status: newpending

I agree the current docs are sparse. Can you provide some specific words that would clarify the page in your mind?

Changed January 29, 2012 04:32AM UTC by Chealer comment:2

status: pendingnew

If I'd know what the selectors do, I suppose I could. I see two likely possibilities which would work with the examples.

The first is the one I described above.

The second is that each element considers its own order, which is the order in the set of children of its parent (:odd-child, :even-child). But then not all elements have a parent.

Changed January 30, 2012 10:46AM UTC by addyosmani comment:3

keywords: → needsdocs

Changed January 30, 2012 10:47AM UTC by addyosmani comment:4

status: newopen

Changed March 10, 2012 01:57PM UTC by dmethvin comment:5

resolution: → fixed
status: openclosed

Docs updated, using a new Reusable called "Document Order".

Changed April 12, 2012 09:58PM UTC by addyosmani comment:6

keywords: needsdocs