mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
Fixes #7744: update grid mixin to use latest grid styles
This commit is contained in:
parent
e67d3818ed
commit
0f17f9b7f7
@ -411,15 +411,20 @@
|
|||||||
}
|
}
|
||||||
// Generate the columns
|
// Generate the columns
|
||||||
.make-column(@columns) {
|
.make-column(@columns) {
|
||||||
@media (min-width: @grid-float-breakpoint) {
|
position: relative;
|
||||||
// Calculate width based on number of columns available
|
// Float and set width: 100%; for easy stacking on mobile devices
|
||||||
width: percentage((@columns / @grid-columns));
|
float: left;
|
||||||
}
|
width: 100%;
|
||||||
// Prevent columns from collapsing when empty
|
// Prevent columns from collapsing when empty
|
||||||
min-height: 1px;
|
min-height: 1px;
|
||||||
// Inner gutter via padding
|
// Inner gutter via padding
|
||||||
padding-left: (@grid-gutter-width / 2);
|
padding-left: (@grid-gutter-width / 2);
|
||||||
padding-right: (@grid-gutter-width / 2);
|
padding-right: (@grid-gutter-width / 2);
|
||||||
|
|
||||||
|
// Calculate width based on number of columns available
|
||||||
|
@media (min-width: @grid-float-breakpoint) {
|
||||||
|
width: percentage((@columns / @grid-columns));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Generate the column offsets
|
// Generate the column offsets
|
||||||
.make-column-offset(@columns) {
|
.make-column-offset(@columns) {
|
||||||
@ -437,16 +442,7 @@
|
|||||||
right: percentage((@columns / @grid-columns));
|
right: percentage((@columns / @grid-columns));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Small, mobile-first columns
|
|
||||||
.make-small-column(@columns) {
|
|
||||||
position: relative;
|
|
||||||
float: left;
|
|
||||||
// Prevent columns from collapsing when empty
|
|
||||||
min-height: 1px;
|
|
||||||
// Set inner padding as gutters instead of margin
|
|
||||||
padding-left: (@grid-gutter-width / 2);
|
|
||||||
padding-right: (@grid-gutter-width / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user