Closed pseigo closed 4 years ago
@pseigo you need to use the namespace when you use @use
which is by default the last import path, or add it globally with the @use 'include-media' as *;
The way you are importing it works as documented with
@use 'include-media';
@include include-media.media('>=desktop') {
p {
color: blue;
}
}
but if you dont want the include-media namespace then either add as *
or another namespace.
eg:
@use 'include-media' as im;
@include im.media('>=desktop') {
p {
color: blue;
}
}
@jackmcpickle
D'oh! That's what I get for cutting corners in the docs. Thanks for the great examples, I really appreciate it! I see the @use
namespace section now and this seems to make sense.
Feel free to close this if the title isn't accurate. :)
No worries mate. Good luck!
Currently,
include-media
doesn't work with@use
. According to the Sass@import
docs,Software versions
Current behaviour
compiled with
produces the error
Possible starting point
From the same docs page,