Is there an alternative to SASS or LESS that implements something like modules and a reasonable global scope?
For example, when I do this in SASS (or in the lower equivalent):
@import "foo.scss"
... it pushes all mixins, variables, etc. from the imported file to the global scope, possibly overriding or encountering loaded or specific mixins / variables. I think this is a mess.
I would like to have something more modular. Imagine what foo.scssmixin has bar:
@mixin bar {
}
To use this mixin, I would name it relative to the namespace "foo". More or like this:
@import "foo.scss"
.bar {
@include foo.bar;
}
In other words: instead of working as an equivalent from foo import *in Python, it @import fooreally works like import foo.So. Is there a CSS preprocessor that is interested in such namespaces?
source
share