mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-29 16:19:53 +02:00
Fix .btn-group-vertical
border radius with dropdown as first element (#40488)
Co-authored-by: Julien Déramond <juderamond@gmail.com>
This commit is contained in:
@@ -135,7 +135,12 @@
|
|||||||
@include border-bottom-radius(0);
|
@include border-bottom-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
> .btn ~ .btn,
|
// The top radius should be 0 if the button is:
|
||||||
|
// - the "third or more" child
|
||||||
|
// - the second child and the previous element isn't `.btn-check` (making it the first child visually)
|
||||||
|
// - part of a btn-group which isn't the first child
|
||||||
|
> .btn:nth-child(n + 3),
|
||||||
|
> :not(.btn-check) + .btn,
|
||||||
> .btn-group:not(:first-child) > .btn {
|
> .btn-group:not(:first-child) > .btn {
|
||||||
@include border-top-radius(0);
|
@include border-top-radius(0);
|
||||||
}
|
}
|
||||||
|
@@ -195,8 +195,6 @@ Make a set of buttons appear vertically stacked rather than horizontally. **Spli
|
|||||||
|
|
||||||
{{< example >}}
|
{{< example >}}
|
||||||
<div class="btn-group-vertical" role="group" aria-label="Vertical button group">
|
<div class="btn-group-vertical" role="group" aria-label="Vertical button group">
|
||||||
<button type="button" class="btn btn-primary">Button</button>
|
|
||||||
<button type="button" class="btn btn-primary">Button</button>
|
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
Dropdown
|
Dropdown
|
||||||
@@ -206,6 +204,8 @@ Make a set of buttons appear vertically stacked rather than horizontally. **Spli
|
|||||||
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
|
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<button type="button" class="btn btn-primary">Button</button>
|
||||||
|
<button type="button" class="btn btn-primary">Button</button>
|
||||||
<div class="btn-group dropstart" role="group">
|
<div class="btn-group dropstart" role="group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
Dropdown
|
Dropdown
|
||||||
|
Reference in New Issue
Block a user