1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

Flexbox all the time (Drop IE9 support and remove $enable-flex option) (#21389)

* remove the $enable-flex variable option

* remove bootstrap-flex.css dist file and it's grunt task

* remove the separate flex css file for docs; it's all the same now

* remove flexbox docs (porting some to the main grid docs in next commit)

* clean up few grid docs bits to simplify copy, start to mention flexbox

* port relevant flexbox-grid.md content to grid.md

- clean up mixins
- update how it works section
- bring over sizing and alignment sections

* remove the $enable-flex from the options.md page

* update lead paragraph to mention flexbox

* update migration to mention loss of ie9 support

* remove mention of flexbox dist file

* clarify IE support

* making a note

* remove flexbox variant mentions from component docs

- updates docs for media object, navs, list group, and cards to consolidate docs
- no more need to callout flexbox variants since it's now the default

* remove $enable-flex if/else from sass files

* remove flex dist files

* update scss lint property order to account for flex properties

* linting

* change to numberless classes for autosizing, wrap in highlighting div

* bump gruntfile and postcss to ie10

* redo intro sections

* rearrange

* phew, redo hella grid docs

- rearrange all the things
- consolidate some bits

* remove reference to flexbox mode

* more border action for demo

* Make some changes to the .card's in .card-deck's to ensure footers align to the bottom
This commit is contained in:
Mark Otto
2016-12-21 20:26:17 -08:00
committed by GitHub
parent f464a5b214
commit eb2e1102be
43 changed files with 655 additions and 10019 deletions

View File

@@ -7,12 +7,8 @@
// Common properties for all breakpoints
%grid-column {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
@if $enable-flex {
width: 100%;
}
width: 100%;
min-height: 1px; // Prevent columns from collapsing when empty
@include make-gutters($gutters);
}
@@ -26,24 +22,20 @@
@extend %grid-column;
}
}
@if $enable-flex {
.col#{$infix} {
@extend %grid-column;
}
.col#{$infix} {
@extend %grid-column;
}
@include media-breakpoint-up($breakpoint, $breakpoints) {
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
@if $enable-flex {
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
}
.col#{$infix}-auto {
flex: 0 0 auto;
width: auto;
}
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
}
.col#{$infix}-auto {
flex: 0 0 auto;
width: auto;
}
@for $i from 1 through $columns {

View File

@@ -5,9 +5,6 @@
@mixin make-container($gutters: $grid-gutter-widths) {
margin-left: auto;
margin-right: auto;
@if not $enable-flex {
@include clearfix();
}
@each $breakpoint in map-keys($gutters) {
@include media-breakpoint-up($breakpoint) {
@@ -40,12 +37,8 @@
}
@mixin make-row($gutters: $grid-gutter-widths) {
@if $enable-flex {
display: flex;
flex-wrap: wrap;
} @else {
@include clearfix();
}
display: flex;
flex-wrap: wrap;
@each $breakpoint in map-keys($gutters) {
@include media-breakpoint-up($breakpoint) {
@@ -58,14 +51,11 @@
@mixin make-col-ready($gutters: $grid-gutter-widths) {
position: relative;
min-height: 1px; // Prevent collapsing
// 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%;
}
width: 100%;
min-height: 1px; // Prevent collapsing
@each $breakpoint in map-keys($gutters) {
@include media-breakpoint-up($breakpoint) {
@@ -77,16 +67,12 @@
}
@mixin make-col($size, $columns: $grid-columns) {
@if $enable-flex {
flex: 0 0 percentage($size / $columns);
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
max-width: percentage($size / $columns);
} @else {
float: left;
width: percentage($size / $columns);
}
flex: 0 0 percentage($size / $columns);
// width: percentage($size / $columns);
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
max-width: percentage($size / $columns);
}
@mixin make-col-offset($size, $columns: $grid-columns) {