aboutsummaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorTobias <[email protected]>2024-05-30 07:49:28 +0200
committerGitHub <[email protected]>2024-05-30 07:49:28 +0200
commit76ed1c6b14942834a02f2c05508d1a0d4b1687b6 (patch)
tree05359fee1caa76985e430382e289fc0a8429f39d /scss
parent442421bcc21017abfa59b230542f464fbc757843 (diff)
downloadbootstrap-76ed1c6b14942834a02f2c05508d1a0d4b1687b6.tar.xz
bootstrap-76ed1c6b14942834a02f2c05508d1a0d4b1687b6.zip
Fix `.btn-group-vertical` border radius with dropdown as first element (#40488)
Co-authored-by: Julien Déramond <[email protected]>
Diffstat (limited to 'scss')
-rw-r--r--scss/_button-group.scss7
1 files changed, 6 insertions, 1 deletions
diff --git a/scss/_button-group.scss b/scss/_button-group.scss
index 55ae3f65d..dcd2a858e 100644
--- a/scss/_button-group.scss
+++ b/scss/_button-group.scss
@@ -135,7 +135,12 @@
@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 {
@include border-top-radius(0);
}