VS Code syntax highlighting for template string css? (Emotion) [duplicate]
Asked Answered
E

1

6

How do I enable syntax highlighting for emotion template string css in VS Code? All the plugins I find are for snippets.

It works with css({ camelCaseCssProps:...}) but I am trying to use css variables for theming without imports and I guess in general I'd rather keep the regular kebab-case css syntax in my global styles file:

// index.js
    
render(
  <Global
    styles={css`
      html {
        // css variables (and/or camel-case props)
        --color-base: white;
        --color-text: #434449;
       }
    `}
  />
)
Excrement answered 25/11, 2021 at 8:47 Comment(0)
T
6

Install the extension vscode-styled-components.

https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components

Transcribe answered 10/11, 2022 at 7:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.