0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Bootstrap/less/grid.less
2013-04-30 19:35:52 -07:00

68 lines
1.4 KiB
Plaintext

//
// Grid system
// --------------------------------------------------
// Set the container width, and override it for fixed navbars in media queries
.container {
.container-fixed();
}
// Mobile-first defaults
.row {
.make-row();
}
// Common styles for small and large grid columns
.col {
position: relative;
// Float and set width: 100%; for easy stacking on mobile devices
float: left;
width: 100%;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
// Generate small grid classes first
.generate-grid-columns(@grid-columns);
// Then generate the larger grid classes via media query
@media screen and (min-width: 768px) {
.generate-large-grid-columns(@grid-columns);
}
// Responsive: Tablets and up
@media screen and (min-width: @screen-tablet) {
.container {
max-width: 728px;
}
.row {
margin-left: (@grid-gutter-width / -2);
margin-right: (@grid-gutter-width / -2);
}
}
// Responsive: Desktops and up
@media screen and (min-width: @screen-desktop) {
.container {
max-width: 940px;
}
}
// Responsive: Large desktops and up
@media screen and (min-width: @screen-large-desktop) {
.container {
max-width: 1170px;
}
}
// Reset utility classes due to specificity
/*[class*="col-span-"].pull-right {
float: right;
}*/