Complete control over search_path apparently not possible
phryk opened this issue · 0 comments
I want the compiler to look for SCSS files to be @import
ed in only the directories
I supply with the search_path
parameter (and in the order they are supplied, too).
However, if I read the code right, this only happens, when an absolute path is given for the file to be @import
ed. For relative imports, the directory of the file containing the @import
is tried first;
https://github.com/Kronuz/pyScss/blob/v1.3.5/scss/extension/core.py#L47 is where this happens.
Deleting lines 47-53 in that file gives me the behavior I want, but since that code is probably there for a reason that I don't quite understand, I'm guessing I'd be fucking over other people if I just handed in a pull request doing that.
For me, rule.source_file.origin
being the last instead of the first directory to be searched would be a passable compromise - but since I don't really know what the reason for adding it is in the first place,
I don't feel like I can judge whether it's acceptable for people depending on the origin being added.
It'd be nice if someone told me why rule.source_file.origin
has to be searched (first) or just implemented the compromise I described, if it is acceptable - or just gave me an alternative way
to accomplish what I'm trying to do.