Bug Tracker

Ticket #3633 (closed bug: invalid)

Opened 2 months ago

Last modified 2 months ago

nth-child unexpectedly counts a div as a child.

Reported by: dottedt Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.3 Component: selector
Version: 1.2.6 Keywords:
Cc: dottedt Needs: Review

Description

When counting the childrenof an ol/ul the nth-child selector will count a div if a div is the child of the ol/ul, not the first child, and previous sibling is a li. This appears to only happen when counting li's such as li:nth-child(4n+1). The number is not relevant.

Attachments

test-case.html (2.6 kB) - added by dottedt 2 months ago.
test case

Change History

Changed 2 months ago by dottedt

test case

Changed 2 months ago by flesler

  • cc set to dottedt
  • status changed from new to closed
  • resolution set to invalid

Divs cannot be children of ol/ul's. Only li's. That's invalid HTML.

Note: See TracTickets for help on using tickets.