Skip to content

Commit

Permalink
Button group refactoring and fixes (#25395)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysds authored and XhmikosR committed Nov 4, 2018
1 parent d275096 commit ea8f6c6
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions scss/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@
z-index: 1;
}
}

// Prevent double borders when buttons are next to each other
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -$btn-border-width;
}
}

// Optional: Group multiple button groups together for a toolbar
Expand All @@ -44,8 +36,10 @@
}

.btn-group {
> .btn:first-child {
margin-left: 0;
// Prevent double borders when buttons are next to each other
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-left: -$btn-border-width;
}

// Reset rounded corners
Expand Down Expand Up @@ -119,17 +113,14 @@
align-items: flex-start;
justify-content: center;

.btn,
.btn-group {
> .btn,
> .btn-group {
width: 100%;
}

> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: -$btn-border-width;
margin-left: 0;
}

// Reset rounded corners
Expand Down

0 comments on commit ea8f6c6

Please sign in to comment.