Closed busti closed 5 years ago
@Busti, you can use the root directory of your assets directly. This depends on the value of sourceDirectory in Assets
(from sbt-web). I think that by default this should be src/main/assets
.
So suppose you've got a directory structure like:
main
└ assets
└ stylesheets
└ deeply
└ nested
└ asset
└ directory
└ style.scss
└ import
└ _import.scss
Then you can import _import.scss
by simply using @import 'stylesheets/import/import'
. Note that a leading /
would mean an import relative to the root of your filesystem.
I'll push the example above in an sbt-test. Then you can check it out.
I just added the example, you can find it here.
Does that answer your question?
That works perfectly.
Thanks a lot for adding the example.
Is it possible to import sass files from an absolute path?
At the moment I am using relative paths for imports all over the place. As a project grows this can get quite messy:
@import '../../../../colors';
Is there a way to point directly to the root directory in
/assets/stylesheets
?