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

Make centered buttons have equal margin #2381

Merged
merged 3 commits into from
May 17, 2019
Merged

Make centered buttons have equal margin #2381

merged 3 commits into from
May 17, 2019

Conversation

james-wasson
Copy link
Contributor

@james-wasson james-wasson commented Feb 24, 2019

This is a bugfix.

Proposed solution

Issue

When you have long buttons within .buttons.is-centered and a button moves to a lower line the alignment of each button is off.
Same issue with .buttons.is-right

Solution

Add equal margin to both sides of the button.

Tradeoffs

We are using button margin value of 0.5rem (0.25rem each side for .is-centered) that value could change so it might be beneficial to use a variable here instead.

Testing Done

I have some js-fiddles with my tests:

shrink the screen to see the broken buttons under

  • Test Buttons Group -> Text Case 1 -> Centered
  • Test Buttons Is-Right -> Any test case

Before:

bulmabeforefix

After:

bulmaafterfix

@james-wasson
Copy link
Contributor Author

james-wasson commented Feb 28, 2019

Updated pull request with new information about .is-right and .is-centered.has-addons

@jgthms jgthms merged commit 196338d into jgthms:master May 17, 2019
@james-wasson james-wasson deleted the buttons-is-centered branch May 29, 2019 14:06
@seb3s
Copy link

seb3s commented May 4, 2020

I've upgraded from previous version 0.6.0. This update unfortunately breaks buttons right alignement with forms for normal size buttons (which is the common case).

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

Successfully merging this pull request may close these issues.

3 participants