1

On "foundation": "5.3.0", why does the following produce error: no mixin named panel when the Sass is compiled (via gulp-sass)?

//#app.scss
@import 'foundation/scss/normalize.scss';
@import 'foundation/scss/foundation.scss';
@import 'foundation/scss/foundation/functions'
@import 'purveyor/p.scss';

//#p.css
.content-box {
   @include panel();
}

Seems like I'm missing some import, but which?

also perhaps worth including:

//# foundation/scss/foundation.scss
@import
  "foundation/components/grid",
  "foundation/components/accordion",
  "foundation/components/alert-boxes",
  "foundation/components/block-grid",
  "foundation/components/breadcrumbs",
  "foundation/components/button-groups",
  "foundation/components/buttons",
  "foundation/components/clearing",
  "foundation/components/dropdown",
  "foundation/components/dropdown-buttons",
  "foundation/components/flex-video",
  "foundation/components/forms",
  "foundation/components/icon-bar",
  "foundation/components/inline-lists",
  "foundation/components/joyride",
  "foundation/components/keystrokes",
  "foundation/components/labels",
  "foundation/components/magellan",
  "foundation/components/orbit",
  "foundation/components/pagination",
  "foundation/components/panels", //<--- shouldn't this be providing the mixin?
  "foundation/components/pricing-tables",
  "foundation/components/progress-bars",
  "foundation/components/range-slider",
  "foundation/components/reveal",
  "foundation/components/side-nav",
  "foundation/components/split-buttons",
  "foundation/components/sub-nav",
  "foundation/components/switches",
  "foundation/components/tables",
  "foundation/components/tabs",
  "foundation/components/thumbs",
  "foundation/components/tooltips",
  "foundation/components/top-bar",
  "foundation/components/type",
  "foundation/components/offcanvas",
  "foundation/components/visibility";
Ben
  • 4,980
  • 3
  • 43
  • 84

1 Answers1

2

As explained here, Sass compiles each .scss file it finds if it does not start with an underscore so when it finds p.scss it compiles it in the absence of the other imported names. The fix was changing the name of the file to _p.scss

Community
  • 1
  • 1
Ben
  • 4,980
  • 3
  • 43
  • 84