Is there a way to customize the list counter style to display commas in the thousands place, similar to number.toLocaleString()
? Or perhaps even adjust based on locale to show either 1,234
or 1.234
?
I have checked the Predefined counter styles but did not find anything that fits this requirement.
The goal is to incorporate CSS animations to create an animated counter like the one demonstrated here: https://codepen.io/wp-asdf123/pen/XWLVPyy. It would be ideal for the output to include commas (or be locale-specific).
It appears that using @counter-style
within the
content: counter(num /*, counter-style? */ );
might be the solution, but I'm not entirely clear on how to implement it.
Any assistance on this matter would be highly appreciated. Thank you.