zurb / foundation-apps

The first front-end framework created for developing fully responsive web apps.
http://foundation.zurb.com/apps
MIT License
1.58k stars 216 forks source link

Hamburger mixin can’t compile with `$offcanvas: false` or `$left: false` #794

Open HughxDev opened 8 years ago

HughxDev commented 8 years ago

Input:

  .menu-icon {
    @include hamburger(
      $width: rem-calc( 24 ),
      $left: false,
      $top: false,
      $thickness: rem-calc( 4 ),
      $gap: rem-calc( 3 ),
      $color: #fff,
      $hover-color: darken( #fff, 10% ),
      $offcanvas: false
    );
  }

Output:

Error: Undefined variable: "$opposite-direction". on line 75 of foundation-apps/scss/helpers/_mixins.scss

------^

If I change it to be $offcanvas: true:

Error: Undefined variable: "$tabbar-menu-icon-width". on line 69 of foundation-apps/scss/helpers/_mixins.scss

    left: ($tabbar-menu-icon-width - $width)/2;

---------------^

I have searched both my local directory and this Github repository to see if the variables $opposite-direction or $tabbar-menu-icon-width are defined anywhere else, and they are not. They both only appear in _mixins.scss.

If I change to $offcanvas: true and $left: 0, it compiles fine, because the corresponding if/then blocks in the mixin definition do not invoke any undefined variables.

metal-gogo commented 8 years ago

Same issue here... @hguiney did you find a solution?

HughxDev commented 8 years ago

@metal-gogo No, I had to use an alternative mixin, sass-burger.