Open ayyash opened 6 years ago
@ayyash So far, scss-scan
only support the local reference, and I suggest that you can download the remote source in your workspace then import the relative path of this file.
And I think it will be work.
Well its fine if the imported file is ignored, but im saying the variables inside the same file are ignored, which is odd, can you not just ignore this line and continue to scan the rest of the file? (i'm talking about a local scss file with that particular line at the top of it)
@ayyash Sorry, Could you give me an example? In my opinion, the variable.less should be defined in only one file instead of different files. Every other file could import this file. So we can even write a webpack-transform-runtime plugin to automatically import this variable.less file at every files` top.
well, i use gulp-sass to concat the files into one so i don't rely on importing manually... but the import is for the google fonts, and is placed in the variables file. So u'r saying if i place the import at the bottom of the variables file, the variables would be scanned? is that a limitation?
my vars file look like this
@import url('https://fonts.googleapis.com/css?family=Poppins:400,700,300');
// bootsrap vars
$spacer: 1.3rem;
$spacers: (
0: 0,
1: ($spacer * .25),
2: ($spacer * .5),
3: $spacer,
4: ($spacer * 1.5),
5: ($spacer * 3)
);
$enable-rounded: true;
$enable-shadows: true;
// ... other vars
I think fonts should not be placed in less variable files. The variable file should be pure. And I have said that this extension is only for local variable & mixins reference.
so bottom line is that the import statement masks the rest of the file, it shouldn't really, should it?
yep.
I have a file that begins with
@import url('https://fonts.googleapis.com/css?family=Poppins:400,700,300');
Even though I tried hard coding the file path in custom paths array, it still cannot scan the variables in the file. When I removed the import rule however it worked.