CSS in JS
See original GitHub issue- styled-components, because Fela, the only possible competitor, isn’t 10x better (from 0 to 1)
- https://github.com/styled-components/styled-components/blob/master/docs/faq.md
- Extract useful patterns from http://jxnblk.com/axs and https://github.com/jxnblk/cxs
- use an official SSR when released, then use http://jxnblk.com/grid-styled
- replace app.css with
import { injectGlobal } from 'styled-components'
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:12 (9 by maintainers)
Top Results From Across the Web
A Thorough Analysis of CSS-in-JS
All CSS-in-JS libraries generate unique CSS class names, a technique pioneered by CSS modules. All styles are scoped to their respective ...
Read more >Why We're Breaking Up with CSS-in-JS - DEV Community
As the name suggests, CSS-in-JS allows you to style your React components by writing CSS directly in your JavaScript or TypeScript code:.
Read more >JavaScript HTML DOM - Changing CSS - W3Schools
The HTML DOM allows JavaScript to change the style of HTML elements. Changing HTML Style. To change the style of an HTML element,...
Read more >The Problems and Benefits of CSS-in-JS - Sparkbox
With CSS-in-JS, design system library components have all of their styles bundled and isolated with the component JavaScript. They can still be ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Definitely didn’t think you were bashing
styled-components
, it’s always good to have a discussion!I’m pretty sure I could cheat pretty easily and get to “100% test coverage” without having any confidence in my library. 😉 it’s a pretty vanity number imo, but I can see where you’re coming from in that it at least makes sure there’s no
undefined is not a function
-type errors.We chose not to allow custom extensions, as we didn’t see the value in them. Basically everything a plugin can do you can do with JavaScript. What are you missing from
styled-components
that would be an extension in another library? (note: we’re working on a “Bourbon for styles in JavaScript”, so things likelighten(color)
will soon be a thing in JS land!)So I changed my mind, again. Sorry for the confusion.
https://github.com/styled-components/styled-components/issues/256