summaryrefslogtreecommitdiff
path: root/remarks/WR-004.txt
diff options
context:
space:
mode:
Diffstat (limited to 'remarks/WR-004.txt')
-rw-r--r--remarks/WR-004.txt42
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>