]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: prevent side-effect from .stack-for in media-object 10679/head
authorNicolas Coden <nicolas@ncoden.fr>
Tue, 26 Dec 2017 21:20:19 +0000 (22:20 +0100)
committerNicolas Coden <nicolas@ncoden.fr>
Tue, 26 Dec 2017 21:20:19 +0000 (22:20 +0100)
Prevent a parent component with `.stack-for-*` to have side effects on `.media-object-section`.

This is a part of a PR and the selector specificity is revert to the one before the PR (0.3.0).

scss/components/_media-object.scss

index 0ae8c51a62f7f692195d934f6a6ebd7cacbf6d93..1f6d44b3da622d5bdad2649f30ab1022b660332f 100644 (file)
@@ -38,6 +38,12 @@ $mediaobject-image-width-stacked: 100% !default;
       }
     }
   }
+
+  &.stack-for-#{$-zf-zero-breakpoint} .media-object-section {
+    @include breakpoint($-zf-zero-breakpoint only) {
+      @include media-object-stack;
+    }
+  }
 }
 
 /// Adds styles for sections within a media object.
@@ -63,12 +69,6 @@ $mediaobject-image-width-stacked: 100% !default;
     margin-bottom: 0;
   }
 
-  .stack-for-#{$-zf-zero-breakpoint} & {
-    @include breakpoint($-zf-zero-breakpoint only) {
-      @include media-object-stack;
-    }
-  }
-
   @if $global-flexbox {
     &.main-section {
       flex: 1 1 0px; // sass-lint:disable-line zero-unit