Skip to content

Commit 7898915

Browse files
committed
Fix placement of form fields when just a single value is set
Intentionally use longhand properties because the custom property fallback mechanism evaluates `initial` values as empty. That makes the other value of the shorthand property unexpectedly used for both axes.
1 parent 637e64d commit 7898915

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/styles/tools/form-fields/_box-field-layout.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
//
5656
// 13. Label and field are vertically aligned to top (start) by default (see 10.). Vertical
5757
// alignment of each block can be changed by theme configuration.
58+
//
59+
// 14. Intentionally use longhand properties because the custom property fallback mechanism evaluates `initial` values
60+
// as empty. That makes the other value of the shorthand property unexpectedly used for both axes.
5861

5962
@use "../../settings/forms";
6063
@use "../../settings/form-fields" as settings;
@@ -125,7 +128,10 @@
125128

126129
.field {
127130
grid-area: field;
128-
place-self: theme.$horizontal-field-vertical-alignment start; // 13. / 7.
131+
// stylelint-disable declaration-block-no-redundant-longhand-properties -- 14.
132+
align-self: theme.$horizontal-field-vertical-alignment; // 13.
133+
justify-self: start; // 7.
134+
// stylelint-enable declaration-block-no-redundant-longhand-properties
129135
}
130136
}
131137
}

0 commit comments

Comments
 (0)