Question Everything .is/listening
Shared by Pedro Porto / 13.05.2017

CSS in JavaScript: The future of component-based styling

By adopting inline styles, we can get all of the programmatic affordances of JavaScript.
This gives us the benefits of something like a CSS pre-processor (variables, mixins, and functions).
It also solves a lot of the problems that CSS has, such as global namespacing and styling conflicts.

For a deep dive into the problems that CSS in JavaScript solves, check out the famous presentation: React CSS in JS. For a case study on the performance improvements you get from Aphrodite, you can read Inline CSS at Khan Academy: Aphrodite.
If you want to learn more about CSS in JavaScript best practices, check out Airbnb’s styleguide.

A ler mais aqui medium.freecodecamp.com/css-in-javascript-the-future-of-component-based-styling-70b161a79a32?source=linkShare-60487ad270-1494666643