Skip to content

Commit 47a5a0e

Browse files
committed
fix: ensure .form-select in .input-group gets proper border-radius
Adds standalone .form-select to the border-radius rules in .input-group: - In .has-validation: adds .form-select:nth-last-child(n+3) selector so form-select not in last 3 children gets border-end-radius: 0 - Adds .form-select:not(:first-child) to the border-start-radius: 0 rule so form-select after another element (e.g. .input-group-text) correctly has left radius removed Fixes issue where .input-group > .input-group-text + .form-select would incorrectly apply full border-radius to the select element instead of removing the shared right border-radius from the text addon. AI-assisted contribution.
1 parent 41e3253 commit 47a5a0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scss/forms/_input-group.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108

109109
&.has-validation {
110110
> :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
111+
> .form-select:nth-last-child(n + 3),
111112
> .dropdown-toggle:nth-last-child(n + 4),
112113
> .form-floating:nth-last-child(n + 3) > .form-control,
113114
> .form-floating:nth-last-child(n + 3) > .form-select {
@@ -120,7 +121,8 @@
120121
$validation-messages: $validation-messages + ":not(." + unquote($state) + "-tooltip)" + ":not(." + unquote($state) + "-feedback)";
121122
}
122123

123-
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
124+
> :not(:first-child):not(.dropdown-menu)#{$validation-messages},
125+
> .form-select:not(:first-child) {
124126
margin-left: calc(-1 * #{$input-border-width}); // stylelint-disable-line function-disallowed-list
125127
@include border-start-radius(0);
126128
}

0 commit comments

Comments
 (0)