Skip to content

Commit 2b421a2

Browse files
committed
fix(material-experimental/mdc-form-field): color inputs not working
Fixes that the `color` type inputs didn't work due to a style override we had on top of MDC.
1 parent 7b3006f commit 2b421a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material-experimental/mdc-form-field/_mdc-text-field-structure-overrides.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
height: auto;
3131
}
3232

33+
// Color inputs are a special case, because setting their height to
34+
// `auto` will collapse them. The height value is an arbitrary number
35+
// which was extracted from the user agent styles of Chrome and Firefox.
36+
.mat-mdc-form-field-control[type='color'] {
37+
height: 23px;
38+
}
39+
3340
// Root element of the mdc-text-field. As explained in the height overwrites above, MDC
3441
// sets a default height on the text-field root element. This is not desired since we
3542
// want the element to be able to expand as needed.

0 commit comments

Comments
 (0)