Upcoming API changes in styled-components v4
Closed this issue · 3 comments
Just a heads-up that we will be making some top-level API changes in v4 that may affect your library.
injectGlobal
is being removedcreateGlobalStyle
is being added
createGlobalStyle
can likely inherit any syntax highlighting rules you may have been using for injectGlobal
, styled.*
etc.
More info: styled-components/styled-components#1867
It would be great to get syntax highlighting for createGlobalStyle
. For now styled.createGlobalStyle``
supports syntax highlighting but doesn't work since I can't seem to inject my global css variables using the default import.
Using the named import const { createGlobalStyle }
works as intended but doesn't seem to have syntax highlighting.
I think you can probably just add createGlobalStyle
to the pipe list at the end of this with the other helpers like keyframes and css: https://github.com/styled-components/vscode-styled-components/blob/master/syntaxes/styled-components.json#L7