Keep up to date with my Sass course: https://learnsass.com

The use of @import has been deprecated in Sass for quite a while now, but a lot of people still use it. In this video, I take a quick look at the replacements you should be using instead, @use and @forward. I just scratch the surface in this one, but it should be enough to get you started!

A quick note, if you are using node-sass, it is out of date and @use and @forward, as well as their entire module system, will not work. If you’re using the Watch Sass extension in VS Code, there is no way to update it. If you are using npm or yarn, just switch out the install of node-sass for sass instead.

Why Sass changed to Dart: https://sass-lang.com/blog/announcing-dart-sass

// Chapters

  • 00:00 - Introduction
  • 00:56 - Watching files for changes
  • 02:00 - @use basics and namespacing
  • 04:46 - important @import and @use difference
  • 07:46 - namespacing
  • 08:38 - @forward with an index file
  • 12:22 - Outro

#sass #css #web-development #programming

Stop using @import with Sass | @use and @forward explained
5.25 GEEK