Skip to content

Support inline CSS imports #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gajus opened this issue Dec 4, 2016 · 3 comments
Open

Support inline CSS imports #2

gajus opened this issue Dec 4, 2016 · 3 comments

Comments

@gajus
Copy link
Owner

gajus commented Dec 4, 2016

It has been requested to support inline CSS imports.

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

@gajus
Copy link
Owner Author

gajus commented Dec 4, 2016

To illustrate a use case:

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

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

@silouanwright
Copy link

silouanwright commented Dec 21, 2016

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.

@gajus
Copy link
Owner Author

gajus commented Dec 22, 2016

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.

xuxinhang pushed a commit to xuxinhang/babel-plugin-react-css-modules that referenced this issue Apr 12, 2020
gajus pushed a commit that referenced this issue Sep 17, 2020
* feat: use RegExp as including condition in filetype config

* test: add corresponding test cases.

* fix: do not use extension-style filrtype as RegExp pattern

* feat: modify the priority between RegExp pattern filetype and extension style filetype

* style: no continue

* style: for comment #2

Co-authored-by: super-cattle <xuxinhang4567#126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants