Bug 167645 - Implement @counter-style
Summary: Implement @counter-style
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: data:text/html,<style>@counter-style ...
Keywords: InRadar
: 167847 (view as bug list)
Depends on: 223150 224718 226792
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-31 09:08 PST by Ebrahim Byagowi
Modified: 2021-06-08 17:17 PDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ebrahim Byagowi 2017-01-31 09:08:38 PST
Related w3 document:
https://www.w3.org/TR/css-counter-styles-3/

To repro:
data:text/html,<style>@counter-style negplus { system: numeric; symbols: '-' '+'; } ol { list-style: negplus }</style><ol><li>1</li><li>2</li></ol>

Expected:
Like Firefox, you should see something like:
 +. 1
+-. 2

Actual:
Whole @counter-style is not supported it seems.
Comment 1 Radar WebKit Bug Importer 2017-02-01 16:09:43 PST
<rdar://problem/30318695>
Comment 2 Alexey Proskuryakov 2017-02-05 09:05:41 PST
*** Bug 167847 has been marked as a duplicate of this bug. ***
Comment 3 Addison Phillips 2017-02-05 11:38:19 PST
You may find the testing information from the duplicate bug useful:


See https://www.w3.org/International/tests/repo/results/counter-styles.en.html  (click on the large text in the left-most column to run the tests)
Comment 4 c933103 2017-12-09 12:33:05 PST
The lack of counter style support affects Japanese, Chinese and Korean numbering, which should use "、" or "," instead of "." after each counter. See https://github.com/w3c/jlreq/issues/12 as discussed in w3c Japanese layout requirements task force.
Comment 5 Liam Quin 2018-03-07 17:05:49 PST
At the very least it would be heplful if Webkit implemented
list-style: "foo";
so that a polyfill could be written reliably. But it would be better if the @counter-style rule was implemented.

This affects a long list of languages that were removed from the draft of the counter styles spec when the @counter-style rule was added to let stylesheet authors define them.
Comment 6 Liam Quin 2018-03-07 20:17:09 PST
See also bug 167729 for requesting the string-value for supporting Russian.
Comment 7 Sierk Bornemann 2019-08-22 12:58:38 PDT
Any progress with fixing this issue?
Comment 8 r12a 2020-06-26 05:22:55 PDT
Ping?
Comment 9 Gérard Talbot 2020-09-16 11:22:37 PDT
Chrome/Blink equivalent bug report:

Issue 687225: Lack of @counter-style support
https://bugs.chromium.org/p/chromium/issues/detail?id=687225
Comment 10 r12a 2021-06-04 00:13:31 PDT
@counter-styles is now supported on Gecko and Blink browsers.  Is there any progress on support for WebKit ?

See test results at https://www.w3.org/International/i18n-tests/results/counter-styles
Comment 11 Tyler Wilcock 2021-06-04 07:41:54 PDT
(In reply to r12a from comment #10)
> @counter-styles is now supported on Gecko and Blink browsers.  Is there any
> progress on support for WebKit ?
> 
> See test results at
> https://www.w3.org/International/i18n-tests/results/counter-styles

WebKit can parse @counter-style rules and descriptors behind a feature flag, but everything else remains (making a map of @counter-styles available in style resolvers, using that map to render lists).  I've been busy for the last month and will be for at least another, but I'd like to get back to this when I can.  Otherwise, if anyone else has time, feel free to take this on.