-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material-experimental/mdc-form-field): fix outline notch width (#…
…23005) * fix(material-experimental/mdc-form-field): fix outline notch width This commit fixes a couple of issues that have been introduced by accident over time: 1. The outline notch width is incorrectly calculated since #21676. This happens because we manually override the label's typography level to `body1` but didn't account for the `font-size` set by the `notched-outline`. This resulted in the computed label width being incorrect. 2. #22089 added `line-height: 0` to fix textarea's accidentally expanding the infix vertically. This breaks custom controls and their alignment. Textarea's behave a little different compared to a native input, and the actual fix seems to be to fix the alignment from `top` to `middle` so that the infix does not try to add additional padding (due to the inherited `body1` line-height and to satisfy `min-height`). Example: https://jsfiddle.net/rpvm4bkL/6/. 3. Typography has been moved with #21676 to the input control (notice how `font: inherit` is removed too). This breaks custom form controls that rely on the typography provided by the form-field (these controls would just inherit typography) 4. Not an actual fix, but a cleanup since 21ab17f added a class to avoid styles from the form-field leaking into standalone inputs. The class has been updated to be more specific that it only matches form-control inputs, and not _any_ type of form control. * fix(material-experimental/mdc-form-field): increase specificity of `line-height: normal` on the floating label Co-authored-by: Miles Malerba <[email protected]> (cherry picked from commit 04d2aaa)
- Loading branch information
1 parent
b487323
commit 13b24ab
Showing
15 changed files
with
104 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.