|
|
|
|
|
by spankalee
3956 days ago
|
|
Shadow DOM completely solves this problem in a better way by scoping styles to a shadow root. The scoping allows the browser to be smarter about style recalc as well. I do really like the idea of importing CSS into JS as a module to access the classnames and IDs though. I would like to do a similar thing with HTML imports as modules: import references to elements based on id. |
|
The shadow dom solves the css modularity problem. And also comes with better "componetization of the web". React is imho not the end solution, and the virtual-dom and the diffing of nodes should actually be built into browsers, and not into a javascript framework...