simolus3 / zap

Zap is a fast web framework built on Dart
https://simonbinder.eu/zap/
MIT License
233 stars 12 forks source link

Optimize scoped css transformation #2

Open simolus3 opened 2 years ago

simolus3 commented 2 years ago

We currently just add a class to every selector, which doesn't appear to always be correct and certainly isn't the most efficient approach. This process could probably be optimized, for instance by once again looking at how Svelte is doing it.

While we're at it, we could also try to find all nodes potentially affected by styles at compile-time and only add relevant classes to them.