5 Matching Annotations
  1. Dec 2020
    1. node-sass may be faster than dart-sass, but as of writing this dart-sass is the only library which implements the @use rule, which is strongly recommended over @import. According to the official sass-lang website:
  2. Nov 2020
    1. The rule is written @forward "<url>". It loads the module at the given URL just like @use, but it makes the public members of the loaded module available to users of your module as though they were defined directly in your module. Those members aren’t available in your module, though—if you want that, you’ll need to write a @use rule as well.

      Just like how you have to also import (@use) a JS module if you want to use it locally, even if you export (@forward) it.

    1. The file is only imported once, no matter how many times you @use it in a project.

      Is this @use sort of like import is in JavaScript (vs require?? does that import file again?)? Or maybe it's more like require vs. load in Ruby?

    2. The new @use is similar to @import. but has some notable differences:
    3. In brief, @import is being replaced with more explicit @use and @forward rules. Over the next few years Sass @import will be deprecated, and then removed.