Re: [csswg-drafts] [css-scoping] Scoping of functions, other name-defining at-rules and custom idents (#11798)

> I'm fairly certain (tree-)scoped custom properties is off the table forever. It will likely cause unacceptable performance regressions.

Isn't tree-scoping names for things that are inherited through cascade practically pointless anyway?

The way I understand it, the options are lexical scoping to help with both functions+mixins and variables, as the scoping is independent of the cascade, **or** tree-scoping which mostly affects functions+mixins which are global.

Tree-scoping functions and mixins would, in practice, achieve about the same as just letting them cascade the same way custom properties do, but with a separate syntax and global-by-default semantics.

This sounds like it could be very cool in more ways than just avoiding name clashes, but wouldn't fully address clashes at all, and still require some other mechanism like lexical scoping to achieve that.

Maybe splitting the discussions into lexical vs. tree scoping would help keep those two threads more on-topic and avoid confusion?

-- 
GitHub Notification of comment by DarkWiiPlayer
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11798#issuecomment-2703578314 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 6 March 2025 11:28:51 UTC