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

Fix incorrect button rounding #4862

Merged
merged 1 commit into from Apr 7, 2021

Conversation

natematykiewicz
Copy link
Contributor

@natematykiewicz natematykiewicz commented Apr 7, 2021

.btn-group uses :first-child and :last-child to determine which buttons should have rounded corners and which ones should have square corners. The "Quiet" button had a square left corner, because the first child was a CSRF hidden field tag.

Keeping only .btn elements inside the .btn-group means that the 1 or 2 buttons are rounded as expected. When there's no "Quiet" button, the "Stop" button has 4 round corners. When both buttons are present, the corners between the buttons are square.

Fixes #4858

I traced this problem to this diff. f0ddebc#diff-d68d7f0b05d0be529c7d2493225a3cd8e5358f0c6327b7dfc8ead5f2927a1ba1L50-L59

The buttons now look like this:

When both buttons are present
Screen Shot 2021-04-06 at 10 49 55 PM

When only Stop is present
Screen Shot 2021-04-06 at 10 55 46 PM

.btn-group uses :first-child and :last-child to determine which
buttons should have rounded corners and which ones should have
square corners. The "Quiet" button had a square left corner,
because the first child was a CSRF hidden field tag.

Keeping only .btn elements inside the .btn-group means that the
1 or 2 buttons are rounded as expected. When there's no "Quiet"
button, the "Stop" button has 4 round corners. When both buttons
are present, the corners between the buttons are square.

Fixes sidekiq#4858
@mperham mperham merged commit 8d860cd into sidekiq:master Apr 7, 2021
@mperham
Copy link
Collaborator

mperham commented Apr 7, 2021

Sharp detective work!

@natematykiewicz
Copy link
Contributor Author

Thanks for the quick merge!

@natematykiewicz natematykiewicz deleted the button-group-fix branch April 7, 2021 04:01
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.

"Quiet" button awkward border radius
2 participants