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 containers (follow-up to #29095) #29118

Merged
merged 7 commits into from
Aug 5, 2019
Merged

Conversation

mdo
Copy link
Member

@mdo mdo commented Jul 23, 2019

This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

I still need to verify if at all we need to make changes to the navbar CSS. That looked more complicated than it needed to be, so need to verify the attribute selectors.

Fixes #25631.

@browner12
Copy link
Contributor

Thank you Mark for addressing this.

Apologies if my tone was harsh.

@mdo
Copy link
Member Author

mdo commented Jul 23, 2019

No need to apologize, I was trying to bring it over and screwed it up—and it only took me 1.5 years to agree with you. 😬 Thanks for sticking with me.

@mdo
Copy link
Member Author

mdo commented Jul 23, 2019

@browner12 I'm pulling in something like the table you made in your original PR, but with the max-widths instead. Can you confirm this matches?

Screen Shot 2019-07-23 at 3 59 10 PM

@MartijnCuppens Sorry for removing your changes before, they were the right move. Let me know once you've had a chance to review this, please.

@browner12
Copy link
Contributor

yes, that looks great. makes it very clear to the user how this feature works.

@mdo
Copy link
Member Author

mdo commented Jul 23, 2019

@browner12 Thank you! <3

@acshef
Copy link

acshef commented Jul 24, 2019

Looking at the table above... both .container and .container-sm have the same behavior. Is that expected?

@browner12
Copy link
Contributor

yah, below 576px it's so small that everything is just full width.

@ocarreterom
Copy link

ocarreterom commented Jul 24, 2019

.container-sm is a 1140px wide responsive container?
Why not .container-fluid-sm? A .container behavior but fluid at sm breakpoint.

With this change, .container-sm could follow the max-width approach.

@browner12
Copy link
Contributor

.container-sm is 1140px wide only on extra large screen sizes.

Containers are either responsive or fluid. The infix determines where that switch happens.

I personally think the max width feature should be handled in userland, but if you'd like to attempt a separate PR, give it a shot.

@mdo
Copy link
Member Author

mdo commented Jul 24, 2019

Yeah, and that container max-width is configurable in $container-max-widths. We just don't specify one for xs right now.

@voltaek
Copy link
Contributor

voltaek commented Jul 25, 2019

With .container and .container-sm operating the same, perhaps the example given in the Layout docs should use .container-md or .container-lg instead of .container-sm since their functionality is unique to them.

@MartijnCuppens
Copy link
Member

@MartijnCuppens Sorry for removing your changes before, they were the right move.

No problem man, nice to see you used the @extend technique here!

It's pretty weird .container and .container-sm do exactly the same. What do you guys think about if we set a max width to the .container of 360px below the sm breakpoint?

@browner12
Copy link
Contributor

I don't thing we could do that on v4, since that would break BC?

@MartijnCuppens
Copy link
Member

Aha, didn't notice the backport-to-v4 tag here. Never mind than, but it might me something to consider for v5 in the future.

@mdo
Copy link
Member Author

mdo commented Jul 25, 2019

Yeah @MartijnCuppens I want to make sure v4 gets this one because of how long I dragged my feet and proposed other ideas.

If you could, give a once over and thumbs up if these new changes match what you and @browner12 had landed on <3.

@MartijnCuppens MartijnCuppens changed the title Follow-up to #29095 Responsive containers (follow-up to #29095) Jul 25, 2019
@MartijnCuppens
Copy link
Member

I was more in need of more container sizes like the initial PR, but this PR make sense too and it will probably be something more people want. For the different container sizes we can still make use of our utility API and combine max-width utilities with the container to center the content.

I do think we should use use a xs breakpoint, like 360px, but since that introduces a BR like @browner12 mentioned, I'll leave that for v5.

So yeah, codewise this looks good to me.

I do think the documentation needs more clarification though, the description here (https://deploy-preview-29118--twbs-bootstrap.netlify.com/docs/4.3/layout/overview/#responsive) is clear, but the demo is confusing. This is probably the same thing @voltaek mentioned.

@mdo
Copy link
Member Author

mdo commented Jul 26, 2019

Will revisit docs for this tonight!

@MartijnCuppens
Copy link
Member

We could also just drop the demo, the explanation and table are clear enough imo. The thing with the demo is that might confuse people if they start resizing their screen and notice nothing happens since we don't actually use the container classes.

@mdo mdo force-pushed the responsive-container-fixes branch from 3d898bb to b020699 Compare August 2, 2019 03:12
@Daemach
Copy link

Daemach commented Aug 2, 2019

but this PR make sense too and it will probably be something more people want.

Yes, I'm waiting anxiously for this. I need standard containers on a desktop where there is a ton of (too much extra) room, and fluid containers on mobile where I need every bit of real estate I can get. Thanks to @browner12 for adding it and for you guys staying on top of it.

mdo added 5 commits August 3, 2019 06:56
This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

Fixes #25631.
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
@mdo mdo force-pushed the responsive-container-fixes branch from 8ae2cef to 51da4cd Compare August 3, 2019 13:56
@mdo mdo merged commit d94148b into master Aug 5, 2019
@mdo mdo deleted the responsive-container-fixes branch August 5, 2019 19:12
XhmikosR pushed a commit that referenced this pull request Aug 6, 2019
* Follow-up to #29095

This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

Fixes #25631.

* update navbar as well because we cannot reset all containers uniformly

* Update navbars example to include container-xl example to ensure containers match

* rewrite responsive containers docs, add table of max-widths

* Update container docs
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
XhmikosR pushed a commit that referenced this pull request Aug 10, 2019
* Follow-up to #29095

This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

Fixes #25631.

* update navbar as well because we cannot reset all containers uniformly

* Update navbars example to include container-xl example to ensure containers match

* rewrite responsive containers docs, add table of max-widths

* Update container docs
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
XhmikosR pushed a commit that referenced this pull request Aug 17, 2019
* Follow-up to #29095

This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

Fixes #25631.

* update navbar as well because we cannot reset all containers uniformly

* Update navbars example to include container-xl example to ensure containers match

* rewrite responsive containers docs, add table of max-widths

* Update container docs
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
lucanos pushed a commit to lucanos/bootstrap that referenced this pull request Oct 27, 2019
* Follow-up to twbs#29095

This PR fixes the responsive containers that were added in twbs#29095, originally stubbed out in twbs#25631. Apologies to @browner12 for getting that wrong.

Fixes twbs#25631.

* update navbar as well because we cannot reset all containers uniformly

* Update navbars example to include container-xl example to ensure containers match

* rewrite responsive containers docs, add table of max-widths

* Update container docs
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants