]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
adds use case for medium down and adds a visual test 10703/head
authorRafiBomb <rafi@zurb.com>
Thu, 5 Oct 2017 21:46:54 +0000 (14:46 -0700)
committerRafiBomb <rafi@zurb.com>
Thu, 5 Oct 2017 21:46:54 +0000 (14:46 -0700)
scss/components/_button-group.scss
test/visual/button/button-group.html [new file with mode: 0644]

index 97150e33b572b6a60e1fdaf5aebedfee2435d667..18298d76ddb9f63d64af5dd2633770cef6057bcd 100644 (file)
@@ -255,5 +255,16 @@ $buttongroup-radius-on-each: true !default;
         }
       }
     }
+
+    &.stacked-for-medium.expanded { // sass-lint:disable-line force-element-nesting
+      @include breakpoint(medium down) {
+        display: block;
+
+        #{$buttongroup-child-selector} {
+          display: block;
+          margin-#{$global-right}: 0;
+        }
+      }
+    }
   }
 }
diff --git a/test/visual/button/button-group.html b/test/visual/button/button-group.html
new file mode 100644 (file)
index 0000000..5b02a35
--- /dev/null
@@ -0,0 +1,45 @@
+<!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">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+    <title>Foundation for Sites Testing</title>
+    <link href="../assets/css/foundation.css" rel="stylesheet" />
+  </head>
+  <body>
+    <div class="grid-container">
+
+      Buttons should be stacked full-width here
+      <div class="button-group stacked">
+        <a class="button">One</a>
+        <a class="button">Two</a>
+        <a class="button">Three</a>
+      </div>
+
+      Buttons should be auto width here and stack for small
+      <div class="button-group stacked-for-small">
+        <a class="button">One</a>
+        <a class="button">Two</a>
+        <a class="button">Three</a>
+      </div>
+
+      Buttons should be expanded here and stack for medium and small
+      <div class="button-group stacked-for-medium expanded">
+        <a class="button">One</a>
+        <a class="button">Two</a>
+        <a class="button">Three</a>
+        <a class="button">Four</a>
+        <a class="button">Five</a>
+      </div>
+
+    </div>
+
+  <script src="../assets/js/vendor.js"></script>
+  <script src="../assets/js/foundation.js"></script>
+  <script>
+  $(document).foundation();
+  </script>
+</body>
+</html>