]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
adds flex to card-divider and fixes card width for narrow content 9743/head
authorRafiBomb <rafi@zurb.com>
Thu, 2 Feb 2017 17:00:54 +0000 (09:00 -0800)
committerRafiBomb <rafi@zurb.com>
Thu, 2 Feb 2017 17:00:54 +0000 (09:00 -0800)
scss/components/_card.scss
test/visual/card/card.html [new file with mode: 0644]

index e6305730bf47eaf5ef9224795d096feedc1181c0..125c21ba77b77a2b4b36e6b8ace51d0f9ce3b4c9 100644 (file)
@@ -56,6 +56,7 @@ $card-margin: $global-margin !default;
   @if $global-flexbox {
     display: flex;
     flex-direction: column;
+    flex-grow: 1;
   }
 
   margin-bottom: $margin;
@@ -81,6 +82,7 @@ $card-margin: $global-margin !default;
 ) {
   @if $global-flexbox {
     flex: 0 1 auto;
+    display: flex;
   }
 
   padding: $padding;
diff --git a/test/visual/card/card.html b/test/visual/card/card.html
new file mode 100644 (file)
index 0000000..e0e276f
--- /dev/null
@@ -0,0 +1,44 @@
+<!doctype html>
+<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
+<html class="no-js" lang="en" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Foundation for Sites Testing</title>
+    <link href="../assets/css/foundation-flex.css" rel="stylesheet" />
+  </head>
+  <body>
+    <div class="row small-up-2 medium-up-3">
+      <div class="column flex-container">
+        <div class="card">
+          <img src="http://placehold.it/300x100">
+          <div class="card-section">
+            <h4>Making sure</h4>
+            <p>card doesnt shrink</p>
+          </div>
+        </div>
+      </div>
+
+      <div class="column flex-container">
+        <div class="card">
+          <img src="http://placehold.it/300x100">
+          <div class="card-section">
+            <h4>Making sure</h4>
+            <p>images below are spread apart and vertically centered</p>
+          </div>
+          <div class="card-divider align-justify align-middle">
+            <img src="http://placehold.it/15">
+            <img src="http://placehold.it/15">
+            <img src="http://placehold.it/15">
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>