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

lcchueri has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-lists] Consider new value for counter-reset ==
Use case: To help solve issues #[3746](https://github.com/w3c/csswg-drafts/issues/3746) and #[5389](https://github.com/w3c/csswg-drafts/issues/5389) , which both needs counting sublevels of sub/super scripts for MATHML.

To use as many generic CSS properties for MathML as possible, I propose to use the list counters in a more generic way:

Considering also, from issue #[1026](https://github.com/w3c/csswg-drafts/issues/1026), _enabling the use of counter() inside calc()_  for property font-size, these counter may be used to control font-size and other styles.


Proposition A:
Consider **<counter-name> parent** as new value for **counter-reset**
**<counter-name> parent** value removes the innermost counter that originates from a sibling or its child, instantiating a counter of given name from parent element with the parent counter value.

for example, UA style for sup/sub element would be something like

sub, sup {
counter-reset: countSubLevel parent;
counter-increment: countSubLevel +1;
font-size: calc(20px-counter(countSubLevel));
}


Proposition B:
Or, instead of new value for counter-reset, may be a new property named counter-remove, as:

property: counter-remove
value: <counter-name>+ | none
inherited: no

counter-remove removes counters names from counter set of the element that comes from siblings and their child.

It happens after New Counters are instantiated and before counter values are incremented.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5402 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 5 August 2020 17:12:27 UTC