2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Add small grid for phones and tablets

This commit is contained in:
Mark Otto
2013-04-02 19:40:43 -07:00
parent 610eb8fb78
commit eadfa59d92
5 changed files with 106 additions and 7 deletions
+10 -2
View File
@@ -12,20 +12,28 @@
.row {
.make-row();
}
[class*="col-span-"] {
[class*="col-span-"],
[class*="col-small-"] {
position: relative;
min-height: 1px;
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
[class*="col-small-"] {
float: left;
}
.generate-small-grid-columns(@grid-columns);
// Responsive: Tablets and up
@media screen and (min-width: 768px) {
.container {
max-width: 728px;
}
// Generate the grid columns and offsets
[class*="col-span-"] { float: left; }
[class*="col-span-"] {
float: left;
}
.generate-grid-columns(@grid-columns);
}
+18
View File
@@ -501,6 +501,24 @@
.col-pull-X(@grid-columns);
}
// Small device grid
.generate-small-grid-columns(@grid-columns) {
// Deterimine the classes
.col-small-span-X (@index) when (@index > 0) {
.col-small-span-@{index} { .col-small-span-(@index); }
.col-small-span-X((@index - 1));
}
.col-small-span-X(0) {}
// Specify widths
.col-small-span-(@columns) {
width: percentage((@columns / @grid-columns));
}
// Generate the CSS
.col-small-span-X(@grid-columns);
}
// Framework mixins