Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] @font-face breaks styles #493

Closed
marc-rutkowski opened this issue Feb 13, 2017 · 5 comments
Closed

[v2] @font-face breaks styles #493

marc-rutkowski opened this issue Feb 13, 2017 · 5 comments
Labels

Comments

@marc-rutkowski
Copy link
Contributor

Version

2.0.0-3

Reproduction

https://github.com/marc-rutkowski/styled-components-v2-font-face
(standard create-react-app)

Steps to reproduce

git clone git@github.com:marc-rutkowski/styled-components-v2-font-face.git
yarn
yarn start

Dev server starts and the app home page displays a red background and use the Pangolin webfont.
@font-face is set by using the injectGlobal helper in App.js

Now, switch to styled-components v2 :

yarn remove styled-components
yarn add styled-components@next
yarn start

Expected Behavior

Same rendering than with styled-components v1.x

Actual Behavior

@font-face breaks styling. The red background is not visible anymore and default font is used instead of the custom one.
If the @font-face rule is removed the red background appears has before.

Maybe related to #462 ?

ps: thanks for this great lib!

@thysultan
Copy link

Thanks, will push a patch for this.

@thysultan
Copy link

patched upstream(parser), cc @mxstbr.

@k15a
Copy link
Member

k15a commented Feb 13, 2017

Awesome 👍

@k15a k15a closed this as completed Feb 13, 2017
@marc-rutkowski
Copy link
Contributor Author

@thysultan thank you for the very fast reply and fix! It works fine now.

@k15a maybe this issue should be stay open until deps are updated to stylis@1.1.2+ ?
Let me know if you want a PR for this...

ps: It took me awhile to understand that it was fixed by this commit ;-)

@k15a
Copy link
Member

k15a commented Feb 14, 2017

@marc-rutkowski Ahh. I thought that we are using version ranges so the patches are covered. OFC it should stay open then^^ PRs are always great 👍
@mxstbr Why did we change that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants