]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fixes the default grid to work when added to a container (namespaced).
authorBrett Mason <brettsmason@gmail.com>
Thu, 6 Oct 2016 10:28:58 +0000 (11:28 +0100)
committerBrett Mason <brettsmason@gmail.com>
Thu, 6 Oct 2016 10:28:58 +0000 (11:28 +0100)
Fully fixes #9225

scss/grid/_classes.scss

index abbfd4aaa3e6e643847014b034d09a7a33938606..7ceb011914d389a952dcc3ad0c25ff704bcd562b 100644 (file)
@@ -23,7 +23,7 @@
   $expanded: 'expanded'
 ) {
   // Row
-  .#{$row} {
+  .#{$row} {
     @include grid-row;
 
     // Collapsing
@@ -34,7 +34,7 @@
     }
 
     // Nesting
-    & & {
+    & .#{$row} {
       @include grid-row-nest($grid-column-gutter);
 
       &.#{$collapse} {
   // The double .row class is needed to bump up the specificity
   .#{$column}.#{$row}.#{$row} {
     float: none;
+  }
 
-    // To properly nest a column row, padding and margin is removed
-    .#{$row} & {
-      padding-left: 0;
-      padding-right: 0;
-      margin-left: 0;
-      margin-right: 0;
-    }
+  // To properly nest a column row, padding and margin is removed
+  .#{$row} .#{$column}.#{$row}.#{$row} {
+    padding-left: 0;
+    padding-right: 0;
+    margin-left: 0;
+    margin-right: 0;
   }
 
   @include -zf-each-breakpoint {
     .#{$-zf-size}-#{$collapse} {
       > .#{$column} { @include grid-col-collapse; }
 
-      .#{$row},
-      .#{$expanded}.#{$row} &.#{$row} {
+      .#{$row} {
         margin-left: 0;
         margin-right: 0;
       }
     }
 
+    .#{$expanded}.#{$row} .#{$-zf-size}-#{$collapse}.#{$row} {
+      margin-left: 0;
+      margin-right: 0;
+    }
+
     .#{$-zf-size}-#{$uncollapse} {
       $gutter: -zf-get-bp-val($grid-column-gutter, $-zf-size);