Syntax highlighting and IntelliSense for styled-components.
Inside VSCode, press
Ctrl+P, and enter:
ext install vscode-styled-components
It should be the top result.
- Detailed CSS IntelliSense while working in styled strings.
- Syntax error reporting.
Raising an issue
Please check the issues list to see if it has already been raised. If it has you can vote on it with a thumbsUp emoji. Issues with the most votes tend to be prioritised.
There's no syntax highlighting?
Syntax Highlighting is specifically made to work with
styled so make sure your default import is
styled and nothing else.
Secondly make sure your file is set to the right language. It should be
Emmet tab completion isn't working
Be sure to include
"emmet.triggerExpansionOnTab": true in your VSCode settings to enable tab completion.** More settings and instructions can be found here.
I get "unknown property: X" on a property I know is valid
Property look up comes from the css language service which in turn comes from MDN Data. If its a custom property, or something that is not in MDN you can add your own property like so: https://github.com/microsoft/typescript-styled-plugin/issues/58#issuecomment-444733368
If however you believe this property is standard and thus missing you can raise this issue with either one of the above projects; please check for any raised issue first.