CodeKit2 icon indicating copy to clipboard operation
CodeKit2 copied to clipboard

Imported Sass files using wildcards '*' are not recognized within the "IMPORTED BY" section

Open VIEWSION opened this issue 9 years ago • 4 comments

I am using wildcards like

@import "*_*/g-*.scss";

to merge other sass files. It works when I am changing the importing file, but not on changes to the imported file. Without wildcards everything works fine.

Wildcard imports do not appear in the "IMPORTED BY" section of the child file nor the "NON-COMPASS IMPORTS" section of the parent file.

btw.. I also wrote you an E-mail about this issue right before I noticed CodeKit here... just ignore it... Thank you for this great tool!

VIEWSION avatar Jan 27 '16 14:01 VIEWSION

I don't see wildcard imports in the official Sass reference. Are you using a plugin?

http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import

Sent from my iPhone

On Jan 27, 2016, at 06:22, VIEWSION [email protected] wrote:

I am using wildcards like

@import "___/g-*scss"; to merge other sass files It works when I am changing the importing file, but not on changes to the imported file Without wildcards everything works fine

Wildcard imports do not appear in the "IMPORTED BY" section of the child file nor the "NON-COMPASS IMPORTS" section of the parent file

btw I also wrote you an E-mail about this issue right before I noticed CodeKit here just ignore it Thank you for this great tool!

— Reply to this email directly or view it on GitHub.

bdkjones avatar Jan 27 '16 17:01 bdkjones

I know that this is not a Sass issue. I am using Sass with Compass. But I thought this is done by the "globbing" import feature as you describe on your website:

CodeKit supports "globbing" import statements in Sass. If you write @import 'someFolder/*', all Sass files in "someFolder" will be imported in alphabetical order. When you change one of the imported files, CodeKit will recompile the base file.

It is kind of strange as for example @import "01_setup/*"; works well as described. @import "01_*/*"; works too, but codekit does not recognize changes to the imported file then.

It would be great if you could use some more complex wildcard patterns than just folder/*

VIEWSION avatar Jan 27 '16 19:01 VIEWSION

Ah. Yea, full wildcards aren't supported. Just one level of globbing is, for performance reasons and basic sanity.

Globbing in general is a bad idea. It can introduce cascade bugs and was rejected as an official part of Sass.

Sent from my iPhone

On Jan 27, 2016, at 11:25, VIEWSION [email protected] wrote:

I know that this is not a Sass issue. I am using Sass with Compass. But I thought this is done by the "globbing" import feature as you describe on your website:

CodeKit supports "globbing" import statements in Sass. If you write @import 'someFolder/*', all Sass files in "someFolder" will be imported in alphabetical order. When you change one of the imported files, CodeKit will recompile the base file.

It is kind of strange as for example @import "01_setup/_"; works well as described. @import "01__/*"; works too, but codekit does not recognize changes to the imported file then.

It would be great if you could use some more complex wildcard patterns than just folder/*

— Reply to this email directly or view it on GitHub.

bdkjones avatar Jan 27 '16 19:01 bdkjones

Ok - thank you... so I go back to my previous direct import statements ;) thx!

VIEWSION avatar Jan 27 '16 19:01 VIEWSION