You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The guaranteed invalid value is useful when we want to provide inline fallbacks for a variable. But currently registered custom properties must have a valid initial-value. At that point, it's no longer possible to provide inline fallbacks – the variable will never again be guaranteed invalid, because it always has a value to revert to.
The text was updated successfully, but these errors were encountered:
I'm starting to use @Property in a design system I'm working on and basically immediately ran into what I think is related to this issue. It's probably a me not understanding the spec more than anything but here's an example:
When --spacing-override has anything other than a <length>, the property isn't registered at all, so it isn't set and the fallback is used. I appear to be able to give a custom-ident in syntax like "<length> | null", and then use "null" as the initial-value, which does register the property, but then --spacing-override is set and the fallback isn't used, even though the "null" value is invalid for padding.
A "guaranteed invalid" value seems like it would address this by saying: "register this property with a given syntax, but mark it as IACT unless it's explicitly set"?
I think this might have been suggested already here or might be loosely related to the "space toggle hack"?
The guaranteed invalid value is useful when we want to provide inline fallbacks for a variable. But currently registered custom properties must have a valid
initial-value
. At that point, it's no longer possible to provide inline fallbacks – the variable will never again be guaranteed invalid, because it always has a value to revert to.The text was updated successfully, but these errors were encountered: