]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix nested off-canvas position issue in IE
authorSassNinja <kai.falkowski@gmail.com>
Wed, 17 May 2017 12:32:05 +0000 (14:32 +0200)
committerSassNinja <kai.falkowski@gmail.com>
Wed, 17 May 2017 12:32:05 +0000 (14:32 +0200)
Since position fixed doesn't work for nested off-canvas elements, it has to be position absolute. Surprisingly (not) the IE doesn't show an opened off-canvas element unless absolute is explicitly set.

scss/components/_off-canvas.scss

index 6390aa4a9c7b903a7043b365a8d30aabfc4699aa..8ef5d004cbce425abe9b4d80944e286f855172b8 100644 (file)
@@ -380,6 +380,12 @@ $content: $maincontent-class
   // Off-canvas container
   .off-canvas {
     @include off-canvas-base;
+
+    // Force position absolute for nested off-canvas because fixed doesn't work in this case (and gets emulated by JS anyway).
+    // This is important for the IE which doesn't show an opened push off-canvas element otherwise!
+    @at-root .#{$maincontent-class} & {
+      position: absolute;
+    }
   }
 
   // Off-canvas container with absolute position