]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix #5155 5159/head
authorWing-Hou Chan <winghouchan@gmail.com>
Thu, 15 May 2014 17:33:50 +0000 (18:33 +0100)
committerWing-Hou Chan <winghouchan@gmail.com>
Thu, 15 May 2014 17:33:50 +0000 (18:33 +0100)
Fix #5155. Hamburger icon has now become a pseudo-element meaning the old way of centre positioning it will not work. Updated version will work.

scss/foundation/components/_global.scss

index 0fd71029d59d3040cc7ef361dd05c6d484077756..5f5050480481d73c4ec4d9fcb22363bc60cd0bec 100644 (file)
@@ -129,27 +129,28 @@ $base-line-height: 150% !default;
     height: 0;
     
     @if $offcanvas {
-       @if $top {
-               top: $top;
-       }
-       @else {
-               top: ($width - rem-calc(3 * $thickness) - rem-calc(2 * $gap))/2;
-       }
-       // disable width centering if $top is not false
+      @if $top {
+        top: $top;
+      }
+      @else {
+        top: 50%;
+        margin-top: -$width/2;
+      }
        @if $left {
-               left: $left;
+         left: $left;
        }
        @else {
-               left: ($tabbar-menu-icon-width - $width)/2;
+         left: ($tabbar-menu-icon-width - $width)/2;
        }
     }
+       
     box-shadow:
       0 0px 0 $thickness $color,
       0 $gap + $thickness 0 $thickness $color,
       0 (2 * $gap + 2*$thickness) 0 $thickness $color;
     width: $width;
   }
-  &:hover {
+  span:hover:after {
     box-shadow:
       0 0px 0 $thickness $hover-color,
       0 $gap + $thickness 0 $thickness $hover-color,