Re:Building a fast Electron app with Rust
by jakelazaroff on Sunday March 18, 2018 @11:50AM
(#16612484)
> Any selector has the potential to mess up the entire page.
That's true, but the modern web stack has several solutions to this. If you don't mind "CSS-in-JS", I've been using the excellent styled-components [1] library for my company's React app. I believe Vuejs supports scoped styles out of the box [2]. And if you'd prefer to just write plain CSS, CSS modules [3] will mangle the classnames in your CSS files so you don't have to worry about collision.
That's true, but the modern web stack has several solutions to this. If you don't mind "CSS-in-JS", I've been using the excellent styled-components [1] library for my company's React app. I believe Vuejs supports scoped styles out of the box [2]. And if you'd prefer to just write plain CSS, CSS modules [3] will mangle the classnames in your CSS files so you don't have to worry about collision.
[1] https://www.styled-components.com/
[2] https://vue-loader.vuejs.org/en/features/scoped-css.html
[3] https://github.com/css-modules/css-modules