Closed the-hotmann closed 1 month ago
works fine here
I've created the corresponding CodePen to check the rendering, and it works well at the xl breakpoint on my side with Firefox, Chrome, Safari (all latest versions on macOS).
3 col--2 | 3 * 16.67% = 50.01 %
.col-xs-2
is defined as the following (source https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/css/bootstrap.css):
.col-xl-2 {
flex: 0 0 auto;
width: 16.66666667%;
}
So it's more 3 * col-xl-2 = 3 * 16.66666667% = 50.00000001%
.
In the provided example, the computed value of a <div class="col-xl-2"
is 220px
at the xl breakpoint.
So everything looks fine here, the browser seems to manage this extra 0.00000001%
well.
Would you have more elements to share? Screenshot, CodePen, browser/OS versions to check in which context you've got this issue?
Ok I have to check again. Will report back.
Edit: true, I have used cssmin
which processed the bootstrap css file and therefore:
.col-xl-2 {
flex: 0 0 auto;
width: 16.66666667%;
}
ended up beeing:
.col-xl-2 {
flex: 0 0 auto;
width: 16.67%;
}
which will not be handled properly anymore.
Sorrry for the calse report.
Prerequisites
Describe the issue
Whn you have an HTML setup like this:
Twice
col-xl-3
and 3 timescol-xl-2
. Which in total would add up to:2*3 + 3*2 = 6+6 = 12
. (one full row). Yet, it will break the row!This is because
col-*-2
= 16.67% width.Calculation:
50% + 50.01% = 100.01% = it will break the row, while it should not!
Reduced test cases
What operating system(s) are you seeing the problem on?
Windows, Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox, Microsoft Edge
What version of Bootstrap are you using?
5.3.3