A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/5906 below:

[css-counter-styles] Change how 'pad' descriptor handles negative sign to match implementations · Issue #5906 · w3c/csswg-drafts · GitHub

The current spec says:

... If the counter value is negative and the counter style uses a negative sign, further reduce difference by the number of grapheme clusters in the counter style’s negative descriptor’s (s).

If difference is greater than zero, prepend difference copies of the specified to the representation.

However, it seems that no browser is doing this. They all prepend the pad symbol to the representation until reaching the specified length, and then add the negative sign.

For example, when using decimal-leading-zero (which has pad: 2 '0'), all browsers (I tested Chrome, Firefox, Safari) give -01, while the correct value should be -1 according to the spec.

Another example is WPT css/vendor-imports/mozilla/mozilla-central-reftests/counter-styles-3/descriptor-pad.html. Using an extension of upper-roman with pad: 3 *, the test expects -**I as the representation of counter value -1, instead of -*I.

Since all existing browsers are interoperable on a different behavior, I propose changing the spec to match the existing implementations.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3