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

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.

BEGIN

 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.

END

-- 
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