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

CSS @media tags compiled incorrectly #759

Closed
maxamante opened this issue Aug 9, 2017 · 2 comments · Fixed by #765
Closed

CSS @media tags compiled incorrectly #759

maxamante opened this issue Aug 9, 2017 · 2 comments · Fixed by #765
Labels

Comments

@maxamante
Copy link

ISSUE:
@media blocks are compiled such that the @media tag and any successive word have no space between. Browsers then throw away the erroneous block.

For example,

@media only screen and (min-width: 42em) {...}

compiles to

'...@mediaonly screen and (min-width: 42em) {...}...'

REPRO/REFERENCE:
https://gist.github.com/anonymous/3ae1fefbef1a4fe1deb280a7654fa3c3

@maxamante
Copy link
Author

maxamante commented Aug 9, 2017

Current workaround: Avoid using words; use only the parenthesized condition. Browsers will treat the parentheses as a word boundary.
For example:

@media (min-width: 42em) {}

@Rich-Harris
Copy link
Member

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

Successfully merging a pull request may close this issue.

2 participants