Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Upcoming API changes in styled-components v4 #126

Closed
quantizor opened this issue Aug 15, 2018 · 3 comments
Closed

Upcoming API changes in styled-components v4 #126

quantizor opened this issue Aug 15, 2018 · 3 comments

Comments

@quantizor
Copy link
Contributor

Just a heads-up that we will be making some top-level API changes in v4 that may affect your library.

  1. injectGlobal is being removed
  2. createGlobalStyle 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

@CodingDive
Copy link

CodingDive commented Sep 6, 2018

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.

@quantizor
Copy link
Contributor Author

quantizor commented Sep 7, 2018

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

mjbvz added a commit to mjbvz/vscode-styled-components that referenced this issue Sep 11, 2018
This release fixes a few false positive for error reporting and adds intellisense for `injectGlobal` and `createGlobalStyle` templates by default (styled-components#126)
@julienp
Copy link
Collaborator

julienp commented Sep 22, 2018

I think with #130 and #129 we're good here.

@julienp julienp closed this as completed Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants