mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-22 10:21:51 +00:00
Button group refactoring and fixes (#25395)
This commit is contained in:
parent
d27509688d
commit
ea8f6c6ff3
1 changed files with 8 additions and 17 deletions
|
|
@ -22,14 +22,6 @@
|
||||||
z-index: 1;
|
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
|
// Optional: Group multiple button groups together for a toolbar
|
||||||
|
|
@ -44,8 +36,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group {
|
.btn-group {
|
||||||
> .btn:first-child {
|
// Prevent double borders when buttons are next to each other
|
||||||
margin-left: 0;
|
> .btn:not(:first-child),
|
||||||
|
> .btn-group:not(:first-child) {
|
||||||
|
margin-left: -$btn-border-width;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
|
|
@ -119,17 +113,14 @@
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.btn,
|
> .btn,
|
||||||
.btn-group {
|
> .btn-group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .btn + .btn,
|
> .btn:not(:first-child),
|
||||||
> .btn + .btn-group,
|
> .btn-group:not(:first-child) {
|
||||||
> .btn-group + .btn,
|
|
||||||
> .btn-group + .btn-group {
|
|
||||||
margin-top: -$btn-border-width;
|
margin-top: -$btn-border-width;
|
||||||
margin-left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue