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

"justify-content-end" does not align flex items to the right #40848

Closed
3 tasks done
s0rin opened this issue Sep 18, 2024 · 4 comments
Closed
3 tasks done

"justify-content-end" does not align flex items to the right #40848

s0rin opened this issue Sep 18, 2024 · 4 comments

Comments

@s0rin
Copy link

s0rin commented Sep 18, 2024

Prerequisites

Describe the issue

After update Bootstrap from 5.3.2 to 5.3.3 "justify-content-end" does not align flex items to the right (on any browser i.e. Chrome, Firefox, MS Edge). This has worked for the close buttons of modal windows until 5.3.2

Reduced test cases

    <div class="d-flex justify-content-end">
      <%= content_tag :button, nil, :class => 'btn-close', :aria_label => "Close",
                      :data => {:bs_dismiss => "modal", :bs_title => "Close window", :bs_placement => "right",
                      	        :bs_toggle => "tooltip"} %>
    </div>

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

5.3.3

@julien-deramond
Copy link
Member

Thanks for reporting an issue @s0rin

Here's the CSS rule of bootstrap.css in 5.3.3:

.justify-content-end {
justify-content: flex-end !important;
}

Here's the CSS rule of bootstrap.css in 5.3.2:

.justify-content-end {
justify-content: flex-end !important;
}

Nothing has changed specifically for this class.

Please try to create a reproducible live example of your issue with CodePen or StackBlitz so we can analyze the real problem :)

@s0rin
Copy link
Author

s0rin commented Sep 19, 2024

Here the reproducible live examples as requested:
[Bootstrap 5.3.2 modal popup] (https://codepen.io/s0rin/pen/VwJoWpo)
[Bootstrap 5.3.3 modal popup] (https://codepen.io/s0rin/pen/yLdmXLo)

@julien-deramond
Copy link
Member

OK, I get it. We changed the CSS of the modal in 5.3.3 (see https://github.com/twbs/bootstrap/pull/39373/files).
On your side, you don't need this extra <div> and use the HTML markup provided in our Modal documentation.
To fix the issue, you can remove the surrounding <div class="d-flex justify-content-end">.

@s0rin
Copy link
Author

s0rin commented Sep 19, 2024

That's right, the fix works, thank you!

@s0rin s0rin closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants