sass error: undefined mixin. Unable to resolve the error

Viewed 798

I'm trying to build a web page with sass. I have a _mixins.scss file where I have written:

@mixin gradient{
background: background(//etc);
}

and a partial class _navbar.scss file where I define a class .menu and attempt to use the mixin: @use '../custom' as *;

.menu{
  @include gradient
  li {
        padding: 0 0.7rem;

    a{
        color: $white !important
         text-transform: capitalize;
      }

      }

}

In visual studio code, intellisense has no problem with the @include, @mixin, and @use statements. Pressing "ctrl + click" on @use points to the correct file. I am running "npm run compile:sass" in a Gitbash window, and the scss is compiling fine. The html file has a link to the stylesheet in style.css, the file where sass compiles the .scss code to. Everything seems connected, and indeed everything up to now has been working fine until tryin to use a mixin. I have googled the issue, looked at similar questions here, and cannot find a way to resolve this.

0 Answers
Related