Skip to content

Commit 9b57836

Browse files
author
Adam Bradley
committed
Merge pull request #567 from mhartington/Responsive-Grid
Responsive grid
2 parents 91f7b01 + d131e03 commit 9b57836

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

scss/_grid.scss

+26
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,29 @@
121121
@include flex(0, 0, 90%);
122122
max-width: 90%;
123123
}
124+
125+
126+
/* Responsive Grid Attribute */
127+
/* Adding a class of responsive to a row */
128+
/* will trigger the flex-direction to */
129+
/* change to column and add some margin */
130+
/* to any columns in the row for clearity */
131+
132+
/* Adjust the max-width value to fit your own needs */
133+
/* Defaults to 767px (iPad portrait width)*/
134+
135+
@media (max-width: $grid-responsive-break) {
136+
.responsive .col {
137+
width: 100%;
138+
margin-bottom:15px;
139+
}
140+
.responsive {
141+
-webkit-box-direction: normal;
142+
-moz-box-direction: normal;
143+
-webkit-box-orient: vertical;
144+
-moz-box-orient: vertical;
145+
-webkit-flex-direction: column;
146+
-ms-flex-direction: column;
147+
flex-direction: column;
148+
}
149+
}

scss/_variables.scss

+1
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ $modal-bg-color: #fff !default;
495495
// -------------------------------
496496

497497
$grid-padding-width: 10px !default;
498+
$grid-responsive-break: 767px !default;
498499

499500

500501
// Action Sheets

0 commit comments

Comments
 (0)