Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not disagreeing, only adding this nit to hopefully shortcut some bickering. (Apologies if this causes more bickering)

Sass variables are both lexically and dynamically scoped. The scope is determined by what you define or import before the lexical scope is evaluated. You can inject basically whatever you want based on execution order. That’s more dynamic than most lexical scoping, where definition context determines resolution.

CSS custom properties are fully dynamic in the sense that they’re context-free when defined. Like Sass variables, that context can be injected by execution order.

The major difference is what constitutes “execution order”. For Sass, it’s evaluation and control flow scoping rules. For CSS custom properties it’s the cascade.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: