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

button size not respected when direct child of div with d-flex #34833

Closed
jclijmans opened this issue Aug 28, 2021 · 1 comment · Fixed by #34834
Closed

button size not respected when direct child of div with d-flex #34833

jclijmans opened this issue Aug 28, 2021 · 1 comment · Fixed by #34834

Comments

@jclijmans
Copy link

When placing a button with size classes as direct child of a div with d-flex, size is not respected

<div class="d-flex flex-row">
  <button type="button" class="m-2 btn btn-primary">Default</button>
  <button type="button" class="m-2 btn btn-primary btn-sm">Small</button>
  <button type="button" class="m-2 btn btn-primary btn-md">Medium</button>
  <button type="button" class="m-2 btn btn-primary btn-lg">Large</button>
</div>

produces
image

While

<div class="d-flex flex-row">
  <div>
    <button type="button" class="m-2 btn btn-primary">Default</button>
    <button type="button" class="m-2 btn btn-primary btn-sm">Small</button>
    <button type="button" class="m-2 btn btn-primary btn-md">Medium</button>
    <button type="button" class="m-2 btn btn-primary btn-lg">Large</button>
  </div>
</div>

produces
image

Not sure if it's a bug, or more likely that I don't understand it properly.

  • Bootstrap 5.1.0
  • Operating system and version (Windows, macOS, Android, iOS)
    Windows 10 21H1
  • Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
    Microsoft Edge : Version 92.0.902.78
    Chrome : Version 92.0.4515.159
    Firefox : 91.0.2 (64-bit)
@zaidjawed
Copy link
Contributor

Maybe I can resolve this issue. Should I work on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants