Closed Bug 1470689 Opened 6 years ago Closed 4 years ago

MDN doesn't document that @counter-style prefixes and suffixes aren't used inside counter() functions

Categories

(Developer Documentation Graveyard :: CSS, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: alexf_ba124, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180622100109

Steps to reproduce:

Attempted to use a custom CSS @Counterstyle to set up a bracketed numbering style.

Minimal example is in a https://jsfiddle.net/0dLq9roe/56/ here.




Actual results:

The lead P number is formatted as bold as expected, but the custom style xl2 (or the prefix, suffix aspect) appears to be ignored. 1 is displayed as the counter value as opposed to (1)


Expected results:

The lead paragraph number should have formatted as (1). 

(Intention was something more like - http://jsfiddle.net/5m0bv1cz/1/ ) which is a work-around I can use.)

If the use of a custom counter style is unsupported outside of lists (And @Counterstyle isn't widely supported on other browsers anyway) , this ought to be clarified in the documentation notes.
Severity: normal → minor
So I'm going to close this bug as invalid, since @counter-style created styles do in fact work inside counter() in Firefox,
but you're being misled by the fact that prefixes and suffixes aren't used, which is per-spec:
https://drafts.csswg.org/css-counter-styles-3/#counter-style-prefix
>Note: Prefixes are only added by the algorithm for constructing the default contents of the ::marker pseudo-element; the prefix is not added automatically when the counter() or counters() functions are used.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Ah.. Thank you... That was the missing information that wasn't in the documentation. So it wasn't a BUG, it was something missing in the Documentation, How do I make a note that the MDN example should be amended? ~~~~
(In reply to alex.farlie from comment #2)
> Ah.. Thank you... That was the missing information that wasn't in the
> documentation. So it wasn't a BUG, it was something missing in the
> Documentation, How do I make a note that the MDN example should be amended?
> ~~~~

Let's go with morphing this into a Developer Documentation bug.
Severity: minor → normal
Status: RESOLVED → REOPENED
Component: Untriaged → CSS
Ever confirmed: true
Product: Firefox → Developer Documentation
Resolution: INVALID → ---
Summary: Custom Counterstyle not supported by counter(name, style) syntax → MDN doesn't document that @counter-style prefixes and suffixes aren't used inside counter() functions
Status: REOPENED → NEW
Priority: -- → P3
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 6 years ago4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.