Re: [csswg-drafts] [css-values] Proposal: `round()` to a finite scale (#11067)

Yeah, I don't think either of those issues directly impact this one; they're definitely for different features.

For a name, I'm thinking `round-to( <options>? , <input>, <outputs>)`.

The syntax of `<outputs>` has a few possibilities. We probably want to be consistent with the other functions and allow bare calculations, which means the list has to be comma-separated (`round-to(var(--foo), 2, 3, 5, 7)`). 

This probably precludes doing literal ranges, tho; we'd need a special syntax to indicate a range. (I suppose *in theory* we could allow `<calc-sum> | <number>{2}`, but that's weird.) I guess a keyword could work. Probably we should look for decent use-cases for multiple ranges before doing anything special, tho. (A single range is what `clamp()` does; is there actually much value in having multiple ranges, or a range combined with single values?)

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


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

Received on Thursday, 24 October 2024 19:33:54 UTC