vscode-styled-components icon indicating copy to clipboard operation
vscode-styled-components copied to clipboard

Doesn't autocomplete when using styled-component's css prop

Open sulaiman1073 opened this issue 5 years ago • 4 comments

https://styled-components.com/docs/api#css-prop

<div
  css={`
    background: papayawhip;
    color: ${props => props.theme.colors.text};
  `}
/>

vscode

sulaiman1073 avatar Mar 21 '20 21:03 sulaiman1073

just found out about that feature :-D

sad that it does not autocomplete in vscode

macrozone avatar Aug 12 '20 09:08 macrozone

For now I am using:

<div
  css={css`
    background: papayawhip;
    color: ${props => props.theme.colors.text};
  `}
/>

I am not sure if this can fatten transpiled code.

alexojegu avatar Sep 24 '20 19:09 alexojegu

dupe of https://github.com/styled-components/vscode-styled-components/issues/220

jasonwilliams avatar Oct 09 '20 09:10 jasonwilliams

dupe of #220

It isn't a duplicate of #220 as the language server does not even recognize the template string to allow autocomplete despite it having syntax highlighting. The only workaround is wrapping the template string with the css function as suggested by @xeladejo.

image

monotykamary avatar May 20 '21 02:05 monotykamary