-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-values-5] we should ensure an if with no fallback can be reasoned about later #10956
Comments
@keithamus I don't understand the second example, I think there may be a typo there? The first one won't work with the current behavior, but that’s a bit of a special case (empty values are valid in custom properties). For non-custom properties, if their whole value is I suspect your first example can be rewritten, but without a real-world use case it's hard to suggest how. |
I think they could both be rewritten to avoid if/else but I was trying to demonstrate a property of the if result is that it should be introspectable in subsequent ifs. |
Agenda+ because, on review, this case isn't actually possible! Earlier, I thought you could just make one of the So, there's no way for an I can see two possible fixes:
Possibly we should do both; testing if a variable is empty might be useful regardless, even if the emptiness came from something other than an |
Deferring this until we precisely nail down the execution/substitution model for nested substitution functions. (#11144) If #11144 goes as I expect, then this case is possible. An invalid variable in the value of a branch will just become the guaranteed-invalid value, which is allowed; only when that branch is selectede for substitution will it trigger and turn the whole thing invalid. That is, |
/If the if conditionals (#10064) have an open question as to whether a condition without a valid fallback should be empty token stream or IACTV. I believe we should consider how these can compose and how user can reason about whether or not the condition resolved to one-or-the-other where possible. Some contrives examples:
I'm unsure if IACTV vs empty token stream precludes conditions such as these but I think if they do that should be a deciding factor,
The text was updated successfully, but these errors were encountered: