Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

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

Open
HughxDev opened this issue Mar 24, 2016 · 2 comments
Open

Comments

@HughxDev
Copy link

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.

@HughxDev HughxDev changed the title Hamburger mixin can’t compile as written Hamburger mixin can’t compile with $offcanvas: false or $left: false Mar 24, 2016
@metal-gogo
Copy link

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

@HughxDev
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants