Skip to content

Commit

Permalink
adds use case for medium down and adds a visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
RafiBomb committed Oct 5, 2017
1 parent e5d89c2 commit 566989c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scss/components/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
}
45 changes: 45 additions & 0 deletions test/visual/button/button-group.html
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 566989c

Please sign in to comment.