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-group and flex classes not aligning correctly due to clearfix #15516

Open
3 tasks done
janinaeb opened this issue Dec 9, 2024 · 0 comments
Open
3 tasks done

Button-group and flex classes not aligning correctly due to clearfix #15516

janinaeb opened this issue Dec 9, 2024 · 0 comments

Comments

@janinaeb
Copy link

janinaeb commented Dec 9, 2024

What should happen?

If using flex classes like .align-justify on a .button-group the buttons should spread evenly within its containers width.

What happens instead?

The clearfix in :before/:after takes space and the buttons are not aligned properly.
See error in the documentation example: Flex Button Group

Possible Solution

The issue is probably a result of moving the clearfix to after the @if that disables the clearfix. Solution would be to add !important to scss/components/_button-group.scss:46 or strengthen the selector in some way.

  @if $global-flexbox {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    flex-grow: 1;
    &::before,
    &::after {
      display: none !important; // Disable clearfix
    }
  }

Test Case and/or Steps to Reproduce (for bugs)

Test Case: https://get.foundation/sites/docs/button-group.html#flexbox-button-group (spaced and justify)
image

Your Environment

  • Foundation version(s) used: 6.9.0

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant