Skip to content

Prevent grid with default cols from breaking when large pre is present#30049

Merged
XhmikosR merged 3 commits intotwbs:masterfrom
JensLuyten:grid-with-pre-bug-fix
Jan 25, 2020
Merged

Prevent grid with default cols from breaking when large pre is present#30049
XhmikosR merged 3 commits intotwbs:masterfrom
JensLuyten:grid-with-pre-bug-fix

Conversation

@JensLuyten
Copy link
Copy Markdown
Contributor

Closes #25410 (Codepen with bug present in issue)

Tested this in Codepen: https://codepen.io/jensluyten/pen/povxyPe.
The min-width: 0; on the .col actually prevents the col from taking up the entire row space.

This was only an issue on the default cols, because specified cols have a fixed flex-basis property that prevents this issue from happening.

@JensLuyten JensLuyten requested a review from a team as a code owner January 17, 2020 14:46
@JensLuyten JensLuyten force-pushed the grid-with-pre-bug-fix branch from dcfe5d6 to 0540ec4 Compare January 17, 2020 15:03
Copy link
Copy Markdown
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks!

@XhmikosR
Copy link
Copy Markdown
Member

XhmikosR commented Jan 22, 2020

Does this apply to v4 @MartijnCuppens? if so please add the label and project in the PRs you approve.

@choldgraf
Copy link
Copy Markdown

choldgraf commented Feb 7, 2022

Did this one get re-introduced? I noticed this behavior on 4.6.1 and saw this section had been changed:

.col#{$infix},
.col#{$infix}-auto {
@extend %grid-column;
}

and didn't see any min-width here:

%grid-column {
position: relative;
width: 100%;
padding-right: $gutter / 2;
padding-left: $gutter / 2;
}

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.

Pre with horizontal scrollbar causes grid to stack

4 participants