Skip to content

Commit 48b2680

Browse files
authored
fix(material/form-field): account in cols attribute on textarea (#29836)
previously we were setting width of 180px on our input field however this also made that textarea width stays the same if they are used with `cols` attribute, this commit ensures we dont do that if we have a textarea with `cols` attribute allowing it to grow in width as much as the attribute wants it to fixes #29459
1 parent cc0532b commit 48b2680

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/form-field/form-field.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ $_icon-prefix-infix-padding: 4px;
187187
// Needed so that the floating label does not overlap with prefixes or suffixes.
188188
position: relative;
189189
box-sizing: border-box;
190+
191+
// We do not want to set fixed width on textarea with cols attribute as it makes different
192+
// columns look same width.
193+
&:has(textarea[cols]) {
194+
width: auto;
195+
}
190196
}
191197

192198
// In the form-field theme, we add a 1px left margin to the notch to fix a rendering bug in Chrome.

0 commit comments

Comments
 (0)