- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 01 Apr 2025 20:22:52 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-values-4] `<integer>` grammar terms and `<number>`-returning functions``, and agreed to the following: * `RESOLVED: Functions that return a <number> will be rounded to an <integer> when used in <integer> context.` <details><summary>The full IRC log of that discussion</summary> <fantasai> TabAtkins: currently our math functions like calc(), sin() etc.<br> <fantasai> TabAtkins: If they return a non-integer value, but required to return <integer>, we automatically round to nearest integer<br> <fantasai> TabAtkins: If you a are a function that returns a number, but not a math function, currently invalid to use in <integer><br> <miriam> +1<br> <kbabbitt> +0.9<br> <lea> +calc(infinity)<br> <fantasai> TabAtkins: Let's just call that valid.<br> <fantasai> TabAtkins: This will not change literal number usage.<br> <bkardell> +a<br> <fantasai> TabAtkins: (that's been invalid for 30 years)<br> <fantasai> TabAtkins: But this allows number-returning function to be used anywhere.<br> <fantasai> astearns: If you have a custom property that is defined to be <integer> and you set its value with these, that works<br> <fantasai> lea: yes, that works<br> <fantasai> astearns: But if you have a custom property not defined as an integer, and set it using one of these math functions, does that get rounded?<br> <fantasai> astearns: because not defining var()<br> <fantasai> TabAtkins: var() will do substitution, and then we resolve the math<br> <fantasai> astearns: We don't expect compat issues here?<br> <fantasai> TabAtkins: I think only example of non-math function defined to return a <number> is sibling-index() and sibling-count()<br> <fantasai> fantasai: That's a spec error!<br> <oriol> The spec is right, they return an <integer> already<br> <fantasai> TabAtkins: But we could have them in theory. We made some up, but dropped them.<br> <fantasai> TabAtkins: So we can fix this problem for anything we do in the future.<br> <fantasai> PROPOSED: Functions that return a <number> will be rounded to an <integer> when used in <integer> context.<br> <fantasai> oriol: Seems reasonable<br> <fantasai> RESOLVED: Functions that return a <number> will be rounded to an <integer> when used in <integer> context.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11040#issuecomment-2770596975 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 1 April 2025 20:22:53 UTC