Re: [csswg-drafts] [css-values] Type conversion functions (#6408)

The problem with a general conversion function is that often these conversions are impossible, so the function needs to either give up and return `NaN` or do weird stuff (like JS' `parseInt()` and `parseFloat()`). 

Since most use cases of conversion to number revolve around counters, I think we should add `counter-value()` or a similar counter-based syntax (what about an extra argument in `counter()`?) and see if any other use cases emerge that are not addressed by this.

Note that the conversion to strings is an entirely different issue that is discussed in #542.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6408#issuecomment-939285036 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 9 October 2021 11:56:49 UTC