-
-
Notifications
You must be signed in to change notification settings - Fork 524
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
Emmet for CSS-in-JS #512
Comments
@renatorib Have you found a solution to use emmet for CSS-inJS yet? |
Nope |
If you're using Atom, check out https://atom.io/packages/atom-emmet-css-in-js |
for vscode there are two packages: The second one has more installs but I couldn't get it to work :/ |
Working on it as a part of Emmet v2: https://github.com/emmetio/emmet/tree/v2 |
@sergeche the behavior would be very similar: for example inside a Notice:
What do you think? |
@goldylucks yes, current implementation works like this: https://github.com/emmetio/emmet/blob/master/test/stylesheet.ts#L167 If it’s mostly a JSON-like output of CSS properties then it’s already implemented in new Emmet |
@sergeche should the lg() gradient CSS Abbreviations work in css-in-js? I can not seem to get it working. |
@tayler-ramsay should work. Do you use latest RC version of Emmet (v2.0.0rc-5)? |
@sergeche thanks for the quick response. I am working in VS code is there a way that I can make sure of the version it is using? I think it only is v2. I could just install is as a dependency that is good. Just wondering if I could upgrade it in VS code. Sorry for editing my response ;/ |
Oh, then it’s not available yet. New Emmet version is only available in new Sublime Text plugin |
Cheers!
Best regards,
*Tayler Ramsay ({*
* ({Developer} && "Designer")*
* return {*
[ Phone: (717) 578-3243,
*www.tayler.co* <http://www.taylerramsay.com/> *]*
* }*
* });*
*"It's such a fine line between stupid, and clever."*
…On Wed, Oct 30, 2019 at 10:15 AM Sergey Chikuyonok ***@***.***> wrote:
Oh, then it’s not available yet. New Emmet version is only available in
new Sublime Text plugin
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#512?email_source=notifications&email_token=ABIQ3EJ6D2Z4ZLBO4UEWQ4DQRGJH5A5CNFSM4DYL4R72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUK2HI#issuecomment-547925277>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIQ3EIQ3SNIWMCE4WE3ZADQRGJH5ANCNFSM4DYL4R7Q>
.
|
Support for css template literals would be great too. E.g. const style = css`
background-color: red;
/* Auto-expand css props */
`; Edit: never mind me, I just needed to install the vscode-styled-components extension. Thanks! |
This is great! Please, @sergeche, let me know if I can be of any help with this feature. |
I made Emmet 2.0 publicly available yesterday (just the core part itself), it’s available in Sublime Text, CodeMirror and Nova editors. You can give me some code snippets with real-world use cases so I can tune editor for better context detection. As an example, in JS(X), abbreviations must be prefixed with |
That's awesome! As for the snippets, it depends on the CSS-in-JS you're using (and even how you have it configured). The original example from this issue is a good example (I tweaked the {
display: 'flex',
fontSize: '16px',
margin: '10px 5px',
} You could also do something like this and get the same results (at least in JSS): {
display: 'flex',
fontSize: 16,
margin: [[5, 10]],
} Since there are many flavors of CSS-in-JS, I think the safest default would be to use values within quotes as in the first example. |
Any chance to try this in VS Code? |
I plan to rewrite VSCode extension in near future to support all Emmet features
Отправлено с iPhone
… 2 мая 2020 г., в 15:25, Thomas ***@***.***> написал(а):
Any chance to try this in VS Code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi 👋 Is this accurate? ☝️ I searched Google but I couldn't find a straight answer. |
Yes, new Emmet version (already in VSCode) already supports output as JSON properties. It requires additional support from plugin itself |
Hey that's awesome! I haven't figured out yet how to make it work.
☝️ Can you elaborate on this a bit or point me in the right direction? Are there docs somewhere on how to get it working? |
Setting Is there another setting I should be using to get CSS object syntax? I can't find a list of possible options anywhere. Here you can see my emmet.for.object.styles.mp4To be clear I'm hoping to type this in my And get this output:
|
This option must be set to Line 257 in 51757fc
Not sure how to set Emmet options in VSCode plugin (I’m not the maintainer) |
I think that you are right @sergeche , have you find the way add the config to VSCode? |
@josegutierro didn’t tried yet. I guess it’s not just an option in VSCode plugin, it should be properly supported by plugin in order to work. |
Thank you @sergeche for the moment I'm using this extension nativeEmmet. Is not really Emmet but there are a lot of snippets with tab completion. Here's the full list |
Is there any way or plugin (vscode/atom) to use emmet with css-in-js, like
glamor
,glamorous
or raw styles?If it does not exist, this issue could be a feature request so
The text was updated successfully, but these errors were encountered: