diff options
| author | netop://ウィビ <paul@webb.page> | 2026-04-11 14:24:49 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-04-11 14:24:49 -0700 |
| commit | 8c34d810af95fae0ef846f54370a8c88bfab7123 (patch) | |
| tree | 436beaf30f7b2b3f15741dd54a37e313964d1f7d /remarks/WR-004.txt | |
Diffstat (limited to 'remarks/WR-004.txt')
| -rw-r--r-- | remarks/WR-004.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/remarks/WR-004.txt b/remarks/WR-004.txt new file mode 100644 index 0000000..d257458 --- /dev/null +++ b/remarks/WR-004.txt @@ -0,0 +1,42 @@ + + + + + + + +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: + + ```scss + @import "sass/uchu/core/mixin"; + + @include font(100, "/type/geist-mono", "socii sans"); + @include font-plus-italics(400, "/type/serif", "socii serif"); + ``` + + to this: + + ```scss + @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. + +References + + [1] <https://sass-lang.com/documentation/breaking-changes/import> + [2] <https://sass-lang.com/documentation/at-rules/use/#choosing-a-namespace> |
