- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Jan 2025 21:29:31 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-values-5][css-mixins-1] Add an if-test for local variables`, and agreed to the following: * `RESOLVED: Style test of if() function sees function arguments shadowing custom properties` <details><summary>The full IRC log of that discussion</summary> <kbabbitt> TabAtkins: andruud asked how should we allow you to test the value of arguments for a cuntion<br> <kbabbitt> ... using the if function which is already in values-5 there's a style test that will let you use custom properties<br> <kbabbitt> ... and resolve if they match particular value<br> <kbabbitt> ... but it wasn't super clear whether that should also work for function arguments<br> <kbabbitt> ... or if we should have a new form for if()<br> <kbabbitt> ... I argued that the design of how arguments work inside @function is intentionally to shadow custom properties<br> <kbabbitt> ... basically one list of -- names that var can access<br> <kbabbitt> ... and find nearerst thing that defines it<br> <kbabbitt> ... it would be weird if if() could pierec that shadowing<br> <kbabbitt> ... so we don't need to do anything special<br> <kbabbitt> ... andruud found that reasonable in private discussion<br> <kbabbitt> ... so unless someone has a great argument for testing custom prop on element that you can't otherwise access, i.e. if you use a var for custom property name ....<br> <kizu> +1<br> <kbabbitt> ... then we'll resolve as said in thread where style test in function sees areguments as well as custom props<br> <lea> q?<br> <lea> q+<br> <astearns> ack lea<br> <kbabbitt> lea: in another issue we discussed expanding conditions of if to allow bare parens comparisons etc.<br> <kbabbitt> ... could this also fit there?<br> <kbabbitt> ... instead of adding more syntax, reference params with bare syntax<br> <kbabbitt> ... this also comes up with relative colors<br> <kbabbitt> ... want if() to evaluate on what color components are<br> <kbabbitt> TabAtkins: my preference is to not add any additional syntax, just reuse existing stuff from if()<br> <kbabbitt> ... which is style test<br> <kbabbitt> ... if we have shorter ways to write style test they;d appply here as well<br> <kbabbitt> lea: makes sense as long as we do add shorter ways<br> <miriam> +1<br> <kizu> q+<br> <astearns> ack kizu<br> <kbabbitt> kizu: there might be ways we could want to do this but not as part of style comparison<br> <kbabbitt> ... if we define local variable with something<br> <kbabbitt> ... or argument with soething<br> <kbabbitt> ... we could still want to get outer variable<br> <kbabbitt> ... different issue, we could resolve ???<br> <kbabbitt> ... different from this when you use condition or style, it's reasonable from author perspective to consider local variables, outer vars the same<br> <kbabbitt> Proposed: Style test of if() function sees function arguments shadowing custom properties<br> <kbabbitt> fantasai: which one is in shadow?<br> <kbabbitt> TabAtkins: if you have custom prop defined on element it's by default visible<br> <kbabbitt> ... but if function variable has same name you get that<br> <kbabbitt> fantasai: makes sense but not clear in resolution<br> <kbabbitt> ... a shadow can either be obscuring something or following it<br> <kbabbitt> TabAtkins: accept whatever verbage you want there<br> <kbabbitt> ... shadowing is standard term for it<br> <kbabbitt> ... I won't say it like that in spec, will use different verbage there<br> <kbabbitt> astearns: function arguments...<br> <dbaron> function arguments shadow custom properties?<br> <fantasai> PROPOSED: Style test of if() function see function arguments, falling back to custom properties?<br> <kbabbitt> RESOLVED: Style test of if() function sees function arguments shadowing custom properties<br> <kbabbitt> TabAtkins: meta: we want to prioritize @function rule for implementation<br> <kbabbitt> ... more attention to it would be great<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11455#issuecomment-2622893933 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 January 2025 21:29:32 UTC