babel-plugin-react-css-modules icon indicating copy to clipboard operation
babel-plugin-react-css-modules copied to clipboard

Support inline CSS imports

Open gajus opened this issue 9 years ago • 3 comments

It has been requested to support inline CSS imports.

https://github.com/4Catalyzer/css-literal-loader

gajus avatar Dec 04 '16 00:12 gajus

To illustrate a use case:

css`
.primary {
  color: black;
  border: 1px solid black;
  background-color: white;
}
`;

<button styleName='primary'></button>;

gajus avatar Dec 04 '16 08:12 gajus

Wow this would be incredible. I love css modules but I don't like the idea of creating another file and creating directories for it... but I still want all of the other benefits like styleName, not using inline CSS styles, not using object literals, etc.

silouanwright avatar Dec 21 '16 20:12 silouanwright

Interesting, I didn't realise that there would be a demand for this. I will take a look into feasibility of this over the weekend.

gajus avatar Dec 22 '16 09:12 gajus