-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Avoid duplication of container breakpoints #30969
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 |
.container { | ||
@include make-container(); | ||
@include make-container-max-widths(); | ||
} | ||
|
||
.container, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.