diff --git a/scss/forms/_input-group.scss b/scss/forms/_input-group.scss index 7a9a14dd7be3..fc4eb448aac8 100644 --- a/scss/forms/_input-group.scss +++ b/scss/forms/_input-group.scss @@ -2,7 +2,9 @@ // Base styles // -.input-group { +.input-group-start, +.input-group-end, +.input-group-around { position: relative; display: flex; flex-wrap: wrap; // For form validation feedback @@ -127,14 +129,51 @@ // with the `.input-group >` part, but without it, we cannot override the sizing. // stylelint-disable-next-line no-duplicate-selectors -.input-group { - > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu), - > .dropdown-toggle:nth-last-child(n + 3) { +.input-group-start { + > .input-group-text, + > .btn { @include border-right-radius(0); } - > :not(:first-child):not(.dropdown-menu) { + > .form-control, + > .form-select, + > .form-file { + margin-left: -$input-border-width; + @include border-left-radius(0); + } +} + +.input-group-end { + > .input-group-text, + > .btn { margin-left: -$input-border-width; @include border-left-radius(0); } + + > .form-control, + > .form-select, + > .form-file { + @include border-right-radius(0); + } +} + +.input-group-around { + > .input-group-text, + > .btn { + &:first-child { + @include border-right-radius(0); + } + + &:not(:first-child) { + margin-left: -$input-border-width; + @include border-left-radius(0); + } + } + + > .form-control, + > .form-select, + > .form-file { + margin-left: -$input-border-width; + @include border-radius(0); + } } diff --git a/site/content/docs/5.0/components/button-group.md b/site/content/docs/5.0/components/button-group.md index 7a5992bbc73f..3e740d631510 100644 --- a/site/content/docs/5.0/components/button-group.md +++ b/site/content/docs/5.0/components/button-group.md @@ -119,7 +119,7 @@ Feel free to mix input groups with button groups in your toolbars. Similar to th -
+
@
@@ -132,7 +132,7 @@ Feel free to mix input groups with button groups in your toolbars. Similar to th
-
+
@
diff --git a/site/content/docs/5.0/components/navbar.md b/site/content/docs/5.0/components/navbar.md index 2bc21533bdd2..cd84de093204 100644 --- a/site/content/docs/5.0/components/navbar.md +++ b/site/content/docs/5.0/components/navbar.md @@ -248,7 +248,7 @@ Input groups work, too. If your navbar is an entire form, or mostly form, you ca {{< example >}}