Skip to content

Commit 10ffd7c

Browse files
authoredMar 27, 2025
refactor!: change default column width to field default width or 12em (#8861)
1 parent 1f566fc commit 10ffd7c

File tree

51 files changed

+68
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+68
-29
lines changed
 

‎packages/form-layout/src/layouts/auto-responsive-layout.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ export class AutoResponsiveLayout extends AbstractLayout {
124124
child.style.removeProperty('--_grid-colstart');
125125
});
126126

127-
host.style.setProperty('--_column-width', props.columnWidth);
127+
if (props.columnWidth) {
128+
host.style.setProperty('--_column-width', props.columnWidth);
129+
} else {
130+
host.style.removeProperty('--_column-width');
131+
}
132+
128133
host.style.setProperty('--_max-columns', Math.min(props.maxColumns, maxColumns));
129134

130135
host.$.layout.toggleAttribute('fits-labels-aside', this.props.labelsAside && this.__fitsLabelsAside);

‎packages/form-layout/src/vaadin-form-layout-mixin.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ export declare class FormLayoutMixinClass {
101101
* When `autoResponsive` is enabled, defines the width of each column.
102102
* The value must be defined in CSS length units, e.g. `100px`.
103103
*
104-
* The default value is `13em`.
104+
* If the column width isn't explicitly set, it defaults to `12em`
105+
* or `--vaadin-field-default-width` if that CSS property is defined.
105106
*
106107
* @attr {string} column-width
107108
*/

0 commit comments

Comments
 (0)