Skip to content

Commit e84e61e

Browse files
committed
.form-group--stacked: fix single child
1 parent 23309f0 commit e84e61e

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

css/spruce.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,10 +1421,6 @@ legend {
14211421
.form-group--stacked {
14221422
display: flex;
14231423
}
1424-
.form-group--stacked > * {
1425-
/* stylelint-disable */
1426-
/* stylelint-enable */
1427-
}
14281424
.form-group--stacked > * + * {
14291425
border-radius: 0;
14301426
-webkit-margin-start: -1px;
@@ -1442,6 +1438,9 @@ legend {
14421438
border-end-end-radius: var(--spruce-border-radius);
14431439
border-end-start-radius: 0;
14441440
}
1441+
.form-group--stacked > *:only-child {
1442+
border-radius: var(--spruce-border-radius);
1443+
}
14451444
.form-group--stacked > *:focus {
14461445
z-index: 2;
14471446
}

css/spruce.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

preview/pug/page/form.pug

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ block content
275275
legend Form Group Stacked
276276
div(class='form-group--stacked')
277277
input(class='form-control' type='text' aria-label='First Name')
278-
input(class='form-control' type='text' aria-label='Last Name')
279278
div(class='form-group--stacked')
280279
input(class='form-control' type='text' aria-label='First Name')
281280
input(class='form-control' type='text' aria-label='Last Name')

scss/form/_group.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
margin-inline-start: -1px;
6363
}
6464

65-
/* stylelint-disable */
65+
// stylelint-disable
6666
&:first-child {
6767
border-start-end-radius: 0;
6868
border-start-start-radius: config('border-radius', $form-control);
@@ -76,7 +76,11 @@
7676
border-end-end-radius: config('border-radius', $form-control);
7777
border-end-start-radius: 0;
7878
}
79-
/* stylelint-enable */
79+
80+
&:only-child {
81+
border-radius: config('border-radius', $form-control);
82+
}
83+
// stylelint-enable
8084

8185
&:focus {
8286
z-index: 2;

0 commit comments

Comments
 (0)