March 15, 2019 03:22 pm GMT
Original Link: https://css-tricks.com/web-standards-meet-user-land-using-css-in-js-to-style-custom-elements/
Web Standards Meet User-Land: Using CSS-in-JS to Style Custom Elements
The popularity of CSS-in-JS has mostly come from the React community, and indeed many CSS-in-JS libraries are React-specific. However, Emotion, the most popular library in terms of npm downloads, is framework agnostic.
Using the shadow DOM is common when creating custom elements, but theres no requirement to do so. Not all use cases require that level of encapsulation. While its also possible to style custom elements with CSS in a regular stylesheet, were going to look at using … Read article
The post Web Standards Meet User-Land: Using CSS-in-JS to Style Custom Elements appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/web-standards-meet-user-land-using-css-in-js-to-style-custom-elements/
Share this article:
Tweet
View Full Article