Sorry, I don't know if it was language barrier, or terminology differences, but I really wasn't picking up what you were putting down. I think that you were talking about list-counter as if it were a CSS counter is where I got lost in the forest. CSS doesn't see nor does it even care about the value used automatically on LI.
The code sample helps. Always does... though I'm still not sure I'm following along 100% on what you even mean.
Are you talking about how attr() returns string, but counter-reset / counter-set requires a number or integer?
(I still don't know why -set and -reset are two separate declarations, they operate identically)If so, yeah that's a pain. And yes, the only "real' workaround right now is to set a custom property in an inline-style as you said... which... yeah. Kinda dumb... but at least you're conveying information about what it is, not what it's supposed to look like.
A painfully small consolation...Honestly, that inline-style in your initial post should have told me what you were talking about... but without the markup it applies to it just turned to gibberish to my brain.Thing is the fix is allegedly coming, but honestly it's something that shouldn't NEED to be fixed. I mean if the JavaScript engine in the browser can handle "String 3" and "Number 3" being the same thing for loose assignment, what's CSS' gripe?
But the syntax that may someday work if it ever leaves the experimental is:
counter-reset: myListItem attr(start integer);
and/or
counter-reset: myListItem attr(start number);
As to which of those will --
someday maybe? -- actually fix this "problem"... your guess is as good as mine.
Sadly public browser support is bupkis, the places it is supported locked away behind configuration flags.
https://caniuse.com/mdn-css_types_attr_type-or-unitIs that what you're referring to?
Also I hear you on how they keep implementing syntactic sugar like the derpy 'nesting" trash or endless pointless artsy-fartsy colourspaces no legitimate website should have any need of... but are dragging their heels on stuff that might actually do things like make formatting and creating layouts easier.
You know, it's kind of funny. CSS is the perfect example of where typecasting is an enemy, not a friend.