Avoid duplication of container breakpoints#30969
Avoid duplication of container breakpoints#30969XhmikosR merged 5 commits intotwbs:v4-devfrom k-utsumi:patch-1
Conversation
|
Nioce finding, thanks :) Seems to work great, preview: https://deploy-preview-30969--twbs-bootstrap.netlify.app/docs/4.5/examples/grid/ I think this is because we use Line 33 in 3caea1c FWIW, if we remove this inclusion, the whole @k-utsumi, could you please:
@twbs/css-review I think this also affects v5, yet it would not be backportable since containers and grid have been split on |
Yup, I agree |
|
@ffoodd |
|
Yes! Thanks :) |
|
@MartijnCuppens In fact, our |
| @include make-container-max-widths(); | ||
| } | ||
|
|
||
| .container, |
|
I think [sm ~ xl] container isn't useful. .container,
.container-[sm ~ xl] { max-width: sm-width }
@include media-breakpoint-up(md) {
.container,
.container-[md ~ xl] { max-width: md-width }
}
@include media-breakpoint-up(lg) {
.container,
.container-[lg ~ xl] { max-width: lg-width }
}
@include media-breakpoint-up(xl) {
.container,
.container-[xl] { max-width: xl-width }
} |
|
Agreed, FWIW we cannot drop them in v4 since it would break things. However it's probably to be considered for v5. |
|
Not sure I follow—what's the problem with |
|
After all, My suggestion's .container and .container-xl are exactry the same. If set size xl at variables with size name, I don't mind. |
|
The containers definitely do different things. At the |
|
Btw, this will need to be changed in v5's |
|
The current behavior of [sm ~ xl] is difficult to explain to designers and workers of other layers, and It is difficult to imagine the usage scene, I think. Behavior sample: |
|
That would indeed be a large change in behavior. The current behaviors come from #25631 and related PRs. They were highly requested features, so for the time being we'll stick with it. |
|
Thanks, maybe I understood that behavior. HTML <div class="container-fluid container-[sm ~ xl]-fixed">
...
</div>CSS .container,
.container-fluid {
width: 100%;
padding-right: 1rem;
padding-left: 1rem;
margin-right: auto;
margin-left: auto;
}
@media (min-width: $grid-breakpoint[sm]) {
.container, .container-[sm]-fixed {
max-width: $container-max-width[sm];
}
}
@media (min-width: $grid-breakpoint[md ... xl]) {
.container, .container-[sm ... xl]-fixed {
max-width: $container-max-width[md ... xl];
}
}I may not get the approval. All I have to do is read the documentation...😅 |
|
@mdo is this ready to be merged? |


ref.