Document: WR-004 P. Webb
2024.11.05
Breaking Change: @import and global built-in functions
Body
I updated dependencies of a SvelteKit project and was surprised to
see it complain about the way I import my Sass files. I could’ve used
the automatic migrator the Sass Lang team mentioned[1] but I don’t
like my project potentially getting mangled, so I turned this:
@import "sass/uchu/core/mixin";
@include font(100, "/type/geist-mono", "socii sans");
@include font-plus-italics(400, "/type/serif", "socii serif");
to this:
@use "sass/uchu/core/mixin" as mixin;
@include mixin.font(100, "/type/geist-mono", "socii sans");
@include mixin.font-plus-italics(400, "/type/serif", "socii serif");
I find that choosing a namespace[2] makes this new import system
feel better.