- From: edbaafi via GitHub <sysbot+gh@w3.org>
- Date: Thu, 27 Feb 2025 04:46:47 +0000
- To: public-css-archive@w3.org
I think I can read between the lines or go look at Chromium to get your intent but my expectation (or at least hope) is that the spec would speak for itself and answer this question clearly and definitively and that you’d be more open to feedback if things could be read in a way that is potentially unclear. If you think the spec is clear on this I don’t know what else to say. But here are various things the spec says on this topic in case you are willing to give it a second look (letters a,b,c and emphasis added for illustration): > a) The if() notation is an [arbitrary substitution function](https://www.w3.org/TR/2024/WD-css-values-5-20241111/#arbitrary-substitution-function) > b) To [resolve an if() function](https://www.w3.org/TR/2024/WD-css-values-5-20241111/#resolve-an-arbitrary-substitution-function), return the [`<declaration-value>`](https://www.w3.org/TR/css-syntax-3/#typedef-declaration-value) associated with the first [`<if-condition>`](https://www.w3.org/TR/2024/WD-css-values-5-20241111/#typedef-if-condition) that is true; if none are true, **return nothing (an empty token stream**). > c) [For each](https://infra.spec.whatwg.org/#list-iterate) [arbitrary substitution function](https://www.w3.org/TR/2024/WD-css-values-5-20241111/#arbitrary-substitution-function) func in value: > 1. [Resolve](https://webidl.spec.whatwg.org/#resolve) func. Let result be the returned result, and fallback be the returned fallback. > **If no result was returned**, set result to the [guaranteed-invalid value](https://www.w3.org/TR/css-variables-1/#guaranteed-invalid-value). I think what is intended in (b) above is that what is ultimately resolved is a valid (empty) value as would occur if the author wrote a blank space as the value of a property (e.g. `—foo: ;`) as was helpfully explained (in order to differentiate this from the guaranteed-invalid value) at another place in one of the specs: > actually writing an empty value into a custom property, like --foo: ; is a valid (empty) value, not the [guaranteed-invalid value](https://www.w3.org/TR/css-variables-1/#guaranteed-invalid-value) But since the actual term “**empty token stream**” was never explicitly defined (I didn’t say the single word "token" was never used) and the phrase (**return nothing**) was used to explain how to resolve an `if()` function, how can you say **return nothing** couldn’t be confused with being the same as **If no result was returned** and would result in the [guaranteed-invalid value](https://www.w3.org/TR/css-variables-1/#guaranteed-invalid-value) as is explained by the actual steps for resolving **arbitrary substitution** functions (which the spec previously stated an if() function is). Or maybe this is the intent and I got the intent wrong, but that's my point. I have read what you pointed me to and get more of the points now (thank you), but I'd appreciate a little clarity in this thread and in the spec. Thanks. -- GitHub Notification of comment by edbaafi Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10064#issuecomment-2686904001 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 27 February 2025 04:46:48 UTC