-
Notifications
You must be signed in to change notification settings - Fork 85
Add support for CSS definitions from JavaScript files in the zeit/styled-jsx format #98
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
Comments
It is possible to extract, but it's tricky to differentiate a JavaScript object literal used for a specific purpose in the application of an object literal containing CSS definitions. But I'm open to ideas on how to interpret the code in this use case. |
Yes thats true but most of the time it is just about find startTag endTag of a
specfic function..
Example startTag: cssʼ
endTag: ʼ
If these were configurable, it would be flexible enough..
See for example https://github.com/zeit/styled-jsx/blob/master/readme.md#keeping-css-in-separate-files
|
Are we talking about the same thing? At first, I thought you were suggesting a parsing engine for JS, one that would traverse the JavaScript files in a workspace looking for CSS class definitions inside object literals. But now it seems that you're talking about auto completion inside JavaScript files. |
I really mean traverse js and or jsx to find css classes.. |
Shouldn t autocomplete already work with react? |
I tried hacking a little bit with this extension, and what I see right now is that, when including javascript files the caching process takes some time. (especially when using npm..) Basically what already stated here: #91 |
Oh, so you're suggesting support for CSS definitions in the format defined by the
It already works, but you shows you auto completions only, it doesn't parse React code looking for CSS definitions. |
yes this would be a good step.. |
@zignd Can I suggest a PR for this? |
Sure, I'd gladly review. Are you planning to work on those two formats?
|
Yes both. |
Hi for people using css in js solutions would be great to have this too..
It should be possible extracting the css from literals?
Similar to #69
But should be easier to accomplish.
The text was updated successfully, but these errors were encountered: