Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive container-fluid #24903

Closed
fulldecent opened this issue Nov 28, 2017 · 7 comments
Closed

Responsive container-fluid #24903

fulldecent opened this issue Nov 28, 2017 · 7 comments

Comments

@fulldecent
Copy link
Contributor

FEATURE REQUEST: .container-*-fluid

DESCRIPTION: Switch to fluid layout for viewports larger than a certain size.

Use case: https://codepen.io/anon/pen/WXaoyo?editors=1100#0

Implementation for .container-xl-fluid:

@media (min-width: 1200px) {
  .container-xl-fluid {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
    width: 100%;
    max-width: none;
  }
}
@exige81
Copy link
Contributor

exige81 commented Nov 29, 2017

You can basically do this with the existing responsive flex direction utilities

example: https://codepen.io/anon/pen/RjeBMG

@fulldecent
Copy link
Contributor Author

Isn't that the same as just normal responsive rows?

https://codepen.io/anon/pen/zPmVGJ

<div class="container-fluid">
  <div class="row">
    <div class="col-xl">
      <p class="alert alert-success">Left</p>
    </div>
    <div class="col-xl">
      <p class="alert alert-primary">Right</p>
    </div>
  </div>
</div>

The problem I am trying to solve is for breakpoints -sm, -md and -lgwith a single column, there are the nice margins that .container has.

screen shot 2017-11-29 at 8 51 32 am
screen shot 2017-11-29 at 8 51 40 am
screen shot 2017-11-29 at 8 51 48 am
screen shot 2017-11-29 at 8 51 56 am
screen shot 2017-11-29 at 8 52 07 am

@mdo
Copy link
Member

mdo commented Nov 29, 2017

The columns changing in the CodePen are coincidental to the actual feature request I think. The idea is that we have the ability to toggle from a pixel width to a fluid one with a class. For example:

<div class="container container-md-fluid">
  <div class="row">...<div>
</div>

This would be independent from the normal grid column classes.

@fulldecent
Copy link
Contributor Author

@mdo Yes this is correct. Sorry, the rows are totally coincidental.

@browner12
Copy link
Contributor

would love to see this addressed for v4.1.

Common use case is I want a .container for larger devices, and when I go to smaller screen, I want to take advantage of all the real estate available to me and switch to a .container-fluid.

<div class="container-fluid container-md">

    <div>I'm full width on small devices and contained on wider screens.</div>

</div>

@mdo
Copy link
Member

mdo commented Apr 11, 2020

Closing since we shipped this in an earlier version with the responsive containers.

@mdo mdo closed this as completed Apr 11, 2020
@fulldecent
Copy link
Contributor Author

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants