You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wow, I didn't even know that people used the media-query thing of @imports for real! Or @imports at all, for that matter. One workaround (which should also be more performant) is to use <link> tags instead. You can also use a /* prettier-ignore */ comment: playground
So, the first node is a media-url node type and the second node is a media-query, so I think if n.name === "import" the concat() should be called in a different way: first concat the media-url and then concat the media-query.
Activity
gimenete commentedon Sep 8, 2017
I have the same issue. Quick way to test it:
Outputs:
lydell commentedon Sep 8, 2017
Wow, I didn't even know that people used the media-query thing of
@imports for real! Or@imports at all, for that matter. One workaround (which should also be more performant) is to use<link>tags instead. You can also use a/* prettier-ignore */comment: playgroundgimenete commentedon Sep 12, 2017
I think the problem is here: https://github.com/prettier/prettier/blob/master/src/printer-postcss.js#L103
The structure of an @import statement is:
@import <url> <media-query>?. For an import with media-query the node has this structure:So, the first node is a
media-urlnode type and the second node is amedia-query, so I think ifn.name === "import"theconcat()should be called in a different way: first concat the media-url and then concat the media-query.