mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-01 01:21:49 +02:00
Follow-up to #19099 for grid fixes
- Restores two-mixin approach to generating semantic grid columns (now with 'make-col-ready' and 'make-col') - Removes need for .col-xs-12 by restoring the mass list of all grid tier classes to set position, min-height, and padding - Adds an initial 'width: 100%' to flexbox grid column prep (later overridden by the column sizing in 'flex' shorthand or 'width') to prevent flexbox columns from collapsing in lower viewports
This commit is contained in:
@@ -33,12 +33,21 @@
|
||||
margin-right: ($gutter / -2);
|
||||
}
|
||||
|
||||
@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
|
||||
@mixin make-col-ready($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
min-height: 1px; // Prevent collapsing
|
||||
padding-right: ($gutter / 2);
|
||||
padding-left: ($gutter / 2);
|
||||
|
||||
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
||||
// always setting `width: 100%;`. This works because we use `flex` values
|
||||
// later on to override this initial width.
|
||||
@if $enable-flex {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
|
||||
@if $enable-flex {
|
||||
flex: 0 0 percentage($size / $columns);
|
||||
// Add a `max-width` to ensure content within each column does not blow out
|
||||
|
Reference in New Issue
Block a user