-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing scss files with custom path prefixes not working #22
Comments
Hi @eagle-r - I think this is due to the use of prefixes in your
and use However, I've just seen that libsass-python now supports import callbacks as of version 0.10, which would allow us to support these kinds of mappings. So that's something for the wish list... |
Thanks for the quick response. You were absolutely correct about the prefixes |
Instead of import paths, use the importer callback so we can handle static paths prefixes, and possibly also non-filesystem storage. This is more complicated than anticipated, because we have to re-create the fallback mechanisms for handling partials and extensions, and because finders.find ignores prefixes. There is probably room for improvement, especially around the source maps, but this is a start. Note that the test_raw_css_import test had to be changed, because the libsass doesn't seem to use @import when callbacks are used.
Instead of import paths, use the importer callback so we can handle static paths prefixes, and possibly also non-filesystem storage. This is more complicated than anticipated, because we have to re-create the fallback mechanisms for handling partials and extensions, and because finders.find ignores prefixes. There is probably room for improvement, especially around the source maps, but this is a start. Note that the test_raw_css_import test had to be changed, because the libsass doesn't seem to use @import when callbacks are used.
From my reading of the docs, I thought I could add the following to my settings,
Then, in my main scss file (
django-site/django_app/static/scss/main.scss
), useHowever, if I do, I get a
CompileError: File to import not found or unreadable: css/bootstrap/variables
even though the commented out relative path works fine.The text was updated successfully, but these errors were encountered: