This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15572 - Do 'visibility:hidden', 'display:none' elements reset a counter?
Summary: Do 'visibility:hidden', 'display:none' elements reset a counter?
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
Depends on:
Reported: 2012-01-15 16:44 UTC by Anton P
Modified: 2012-12-04 00:53 UTC (History)
0 users

See Also:


Description Anton P 2012-01-15 16:44:22 UTC
Reported by Peter Moulder

12.4.3 (Counters in elements with 'display: none') says:

  # An element that is not displayed ('display' set to 'none') cannot
  # increment or reset a counter.
  # [...]
  # Elements with 'visibility' set to 'hidden', on the other hand, do
  # increment counters.

Which rule wins?

Tests indicate that UAs do not increment counters for 'visibility:hidden' elements that are 'display:none' (or whose parent is 'display:none'), which seems reasonable.

Conversation begins:

Bug description: