Open rrrnld opened 7 years ago
This is generally the right way to go. Any preprocessor (I'm usually using Stylus, but it probably doesn't matter) should be able to import the file. You cut the error message off before the filename, but is the error occurring in your .vue component, or in the .css file?
Because it seems that the error happens in node-sass
, with some malformed media query.
@heyarne @danieldiekmeier I had the same error message (Error: media query expression must begin with '(' while parsing file:
) for the following code:
<style lang="sass">
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons)
...
</style>
Adding a semi-colon after the import statement seems to fix it:
<style lang="sass">
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons);
...
</style>
I have not quite wrapped my head around the best practices when working with a CSS framework. I've hoped I could simply do
but unfortunately there's no inlining whatsoever, making the build-process kind of pointless (it sends an additional HTTP-request for every stylesheet, just like it would when embedding via a
<link>
-element).I see that there is no pre-processing done on the normal CSS styles, but importing with
node-sass
fails withError: media query expression must begin with '(' while parsing file: ...
.This suggests to me that this is a bug. Is there any other option or what's the general way to go?