Intent to Implement and Ship: CSS counter-set

120 views
Skip to first unread message

Vladimir Levin

unread,
Jun 10, 2020, 12:21:35 PM6/10/20
to blink-dev
vmp...@chromium.org Specification: https://drafts.csswg.org/css-lists-3/#propdef-counter-set This feature is already adopted into css-lists-3 CSS counter-set is an additional property introduced in css-lists-3 to control counters by setting an existing counter to a specified value. This builds upon other implemented counter control properties, specifically counter-reset (which creates a new counter with a specified value) and counter-increment (which increments an existing counter by a specified amount). This feature is needed for precise counter control, since otherwise it is not possible to set an existing counter to a value, other than figuring out how to increment or decrement it.
This feature is already shipped by Firefox, and it is a new CSS property which poses a low risk of interoperability problems. Firefox: Shipped (https://developer.mozilla.org/en-US/docs/Web/CSS/counter-set) Shipped in Firefox 68 according to MDN Edge: No public signals Safari: No public signals Web developers: No signals
Yes Yes https://wpt.fyi/results/css/css-lists/counter-set-001.html https://wpt.fyi/results/css/css-contain/counter-scoping-002.html https://wpt.fyi/results/css/css-lists/parsing/counter-set-valid.html http://crbug.com/991601 https://chromestatus.com/feature/4688138070917120

Anders Hartvoll Ruud

unread,
Jun 10, 2020, 3:37:29 PM6/10/20
to Vladimir Levin, blink-dev
Do you expect any difficulty implementing this, or is it as straightforward as it looks?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADsXd2Oy1K755VKijEnW2ZYsdcP3mpmQYvhSCSeQt7oN-FasHA%40mail.gmail.com.

Vladimir Levin

unread,
Jun 10, 2020, 3:42:44 PM6/10/20
to Anders Hartvoll Ruud, blink-dev
On Wed, Jun 10, 2020 at 3:37 PM Anders Hartvoll Ruud <and...@chromium.org> wrote:
Do you expect any difficulty implementing this, or is it as straightforward as it looks?

I think this is pretty straightforward. All of the code is already done for counter-increment and counter-reset, so adding a new way of adjusting an existing counter should be pretty easy.

 

Manuel Rego Casasnovas

unread,
Jun 11, 2020, 7:41:52 AM6/11/20
to Vladimir Levin, Anders Hartvoll Ruud, blink-dev
LGTM1

This is already in Firefox and it looks like a stable CSS property.

BTW, there's already a bug reported in WebKit
(https://bugs.webkit.org/show_bug.cgi?id=97337) which even had a patch
from 2012 that hasn't landed. But it looks it was not because WebKit
didn't want the feature, but that the patch was not worked on after the
review.

Bye,
Rego

On 10/06/2020 21:42, Vladimir Levin wrote:
>
>
> On Wed, Jun 10, 2020 at 3:37 PM Anders Hartvoll Ruud
> <and...@chromium.org <mailto:and...@chromium.org>> wrote:
>
> Do you expect any difficulty implementing this, or is it as
> straightforward as it looks?
>
>
> I think this is pretty straightforward. All of the code is already done
> for counter-increment and counter-reset, so adding a new way of
> adjusting an existing counter should be pretty easy.
>
>  
>
>
> On Wed, Jun 10, 2020 at 6:21 PM Vladimir Levin <vmp...@chromium.org
> <mailto:vmp...@chromium.org>> wrote:
>
> Contact emails...@chromium.org
> <mailto:vmp...@chromium.org>Design docs/specSpecification:
> https://drafts.csswg.org/css-lists-3/#propdef-counter-setTAG
> reviewThis feature is already adopted into css-lists-3
> SummaryCSS counter-set is an additional property introduced in
> css-lists-3 to control counters by setting an existing counter
> to a specified value. This builds upon other implemented counter
> control properties, specifically counter-reset (which creates a
> new counter with a specified value) and counter-increment (which
> increments an existing counter by a specified amount).
> MotivationThis feature is needed for precise counter control,
> since otherwise it is not possible to set an existing counter to
> a value, other than figuring out how to increment or decrement
> it. Risks
> Interoperability and Compatibility This feature is already
> shipped by Firefox, and it is a new CSS property which poses a
> low risk of interoperability problems. /Firefox/: Shipped
> (https://developer.mozilla.org/en-US/docs/Web/CSS/counter-set)
> Shipped in Firefox 68 according to MDN /Edge/: No public signals
> /Safari/: No public signals /Web developers/: No signals
> Will this feature be supported on all six Blink platforms
> (Windows, Mac, Linux, Chrome OS, Android, and Android
> WebView)?Yes Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?Yes
> https://wpt.fyi/results/css/css-lists/counter-set-001.htmlhttps://wpt.fyi/results/css/css-contain/counter-scoping-002.htmlhttps://wpt.fyi/results/css/css-lists/parsing/counter-set-valid.htmlTracking
> bughttp://crbug.com/991601Link to entry on the Chrome Platform
> Statushttps://chromestatus.com/feature/4688138070917120
>
> --
> You received this message because you are subscribed to the
> Google Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADsXd2Oy1K755VKijEnW2ZYsdcP3mpmQYvhSCSeQt7oN-FasHA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKFBnUpfig3CF0EG3uRX_9Y3J-kthN-_DqiP6hrxYHqgr6tD%2Bw%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKFBnUpfig3CF0EG3uRX_9Y3J-kthN-_DqiP6hrxYHqgr6tD%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADsXd2PaM5BdDOXy4PtFPx11HBfEQoZ_xGVzMbYqHCQUNfoDRA%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADsXd2PaM5BdDOXy4PtFPx11HBfEQoZ_xGVzMbYqHCQUNfoDRA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Yoav Weiss

unread,
Jun 11, 2020, 9:33:02 AM6/11/20
to Manuel Rego Casasnovas, Vladimir Levin, Anders Hartvoll Ruud, blink-dev
LGTM2

On Thu, Jun 11, 2020 at 1:41 PM Manuel Rego Casasnovas <re...@igalia.com> wrote:
LGTM1

This is already in Firefox and it looks like a stable CSS property.

BTW, there's already a bug reported in WebKit
(https://bugs.webkit.org/show_bug.cgi?id=97337) which even had a patch
from 2012 that hasn't landed. But it looks it was not because WebKit
didn't want the feature, but that the patch was not worked on after the
review.

That's a shame :/
 
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/89098bd7-296c-4af5-cab9-d46bbefe6aef%40igalia.com.

Chris Harrelson

unread,
Jun 11, 2020, 11:53:09 AM6/11/20
to Yoav Weiss, Manuel Rego Casasnovas, Vladimir Levin, Anders Hartvoll Ruud, blink-dev
Reply all
Reply to author
Forward
0 new messages