Bootstrap: Flex basis

Created on 5 Dec 2018  路  5Comments  路  Source: twbs/bootstrap

I thinks You can add more flex utilities.
Here is for flex-basis. What does it do?
It stretches div to full width.
It could be useful (I needed it as in screenshots).
There could be also variations like 25, 50, 75 (as in w-x)

.flex-basis-100 {
  flex-basis: 100% !important;
}

.flex-basis-0 {
  flex-basis: auto !important;
}


@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

    .flex#{$infix}-basis-100 {
      flex-basis: 100% !important;
    }
    .flex#{$infix}-basis-0 {
      flex-basis: auto !important;
    }
  }
}

bootstrap-basis-md
bootstrap-basis-sm

Most helpful comment

Just to let you know that this is already possible with the current available utilities: https://codepen.io/anon/pen/zMVOyK

All 5 comments

Just to let you know that this is already possible with the current available utilities: https://codepen.io/anon/pen/zMVOyK

According to @florianlacreuse answer I close this issue, plus we don't plan to add more utilities.

/CC @twbs/css-review If I'm wrong do not hesitate to re open this issue

Yup indeed, thanks for answering this, @florianlacreuse!

@florianlacreuse I believe w-100 has no responsive equivalents like w-md-100.
flex-basis is for responsive pattern (from first to second layout)

@piernik Confirm, there are no reponsive sizing utilities and according to this comment there are no plans to add responsive variants any time soon (for sizing things).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cvrebert picture cvrebert  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

leomao10 picture leomao10  路  3Comments

knownasilya picture knownasilya  路  3Comments

fohlsom picture fohlsom  路  3Comments