0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/less/grid.less

68 lines
1.4 KiB
Plaintext
Raw Normal View History

2012-06-29 06:46:45 +02:00
//
// 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: @screen-small) {
.generate-large-grid-columns(@grid-columns);
2013-04-03 04:40:43 +02:00
}
2013-04-03 04:40:43 +02:00
// Responsive: Tablets and up
@media screen and (min-width: @screen-tablet) {
.container {
max-width: 728px;
}
2013-05-01 04:35:52 +02:00
.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;
}*/