3 ms·
Note that the benefits of scoped CSS are completely independent from single-file components. The key idea is that with CSS and DOM scoping you write simpler, e
by spankalee 9y ago
Note that the benefits of scoped CSS are completely independent from single-file components.
The key idea is that with CSS and DOM scoping you write simpler, easier to understand, stylesheets and templates, which massively improves maintainability.
In Polymer elements, because of Shadow DOM, selectors are considerably simpler and shorter, often just using a tag name or id. Templates for a single component often fit in one screen, so you can more easily see if a selector is used.
As we get into more declarative template formats and better static analysis, we'll be able to see if selectors are used even for dynamic classes and attributes.