W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [css-lists] Consider new value for counter-reset (#5402)

From: Leonardo Couto Chueri via GitHub <sysbot+gh@w3.org>
Date: Fri, 07 Aug 2020 02:20:02 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-670284066-1596766801-sysbot+gh@w3.org>
Republishing A-proposition, hoping to do a better explanation.

The A-proposition **counter-reset: <counter-name> parent**, first copies all counters from sibling (or parent), as [section 4.4.1](https://www.w3.org/TR/css-lists-3/#inheriting-counters), and changes how it operates in step 3 of algorithm of [section 4.4.2](https://www.w3.org/TR/css-lists-3/#inheriting-counters), copying value from parent instead a given integer.


 1. Let counters be element’s CSS counters set.

 2. Let innermost counter be the last counter in counters with the name name. If innermost counter’s originating element is element or a previous sibling of element, remove innermost counter from counters.

 3. Append a new counter to counters with name name, originating element element, and 
  1. If initial value is an integer initializes with this.

  2. Else if string **parent**, gets the initial value from parent element's counter with the same name.


GitHub Notification of comment by lcchueri
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5402#issuecomment-670284066 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 7 August 2020 02:20:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC