Hacker News new | past | comments | ask | show | jobs | submit login

CSS Custom Properties have a cost. If you’re using them as global variables, and don’t need to look them up from JavaScript, or change them according to media queries, it’s good to flatten them out of existence: your bundle will be smaller, your execution faster, and your memory usage reduced. Same with mixins.

It would be good if Lightning CSS supported that use case: https://github.com/parcel-bundler/lightningcss/issues/69.

Compile-time variables are still a useful feature. CSS Custom Properties get used in a lot of places where compile-time variables would be better.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: