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 if() function has a style() test, which accepts a <style-query>. We should have a test which can reach local variables / parameters as well, such that you can do e.g.:
One option could be to spec that if(style()) targets locals within a function context (i.e. it sees the same thing var() sees), but this might stretch the definition of "style". Otherwise, I guess we'll need to invent a new test.
The text was updated successfully, but these errors were encountered:
I think just using style() is the right way to go. Local variables fully shadow custom properties in other contexts; it feels weird for style() to be able to pierce thru that and see all the way to the element. Also, the variable shadowing behavior is very intentionally meant to be able to let a caller override what a callee sees for custom props.
Within a custom function,
var()
can refer to a local variable / parameter, e.g:The if() function has a
style()
test, which accepts a<style-query>
. We should have a test which can reach local variables / parameters as well, such that you can do e.g.:One option could be to spec that
if(style())
targets locals within a function context (i.e. it sees the same thingvar()
sees), but this might stretch the definition of "style". Otherwise, I guess we'll need to invent a new test.The text was updated successfully, but these errors were encountered: