This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(text-field): Input position and textarea size (#3321)
BREAKING CHANGE: The `mdc-text-field--upgraded` class has been removed. `mdc-text-field__input` position has changed by 2px to match spec. `mdc-text-field--textarea` width in IE and Edge now matches other browsers. ### What it does - Fixes vertical text alignment of `mdc-text-field__input` in the `mdc-text-field--box` variant to match spec. Baseline is now 28px instead of 30px. See #2826. - Fixes `textarea` width in IE and Edge: - Replaces unsupported values `fit-content` and `initial` with `auto` - Removes the `mdc-text-field--upgraded` class: - Prevents text fields from resizing and causing browser reflow jank after the JS initializes - Most properties from `mdc-text-field--upgraded` have been moved to `mdc-text-field` - Sets `display: inline-flex`, `box-sizing: border-box`, and `margin-top: 16px` on all variants ### Example output #### Before: ![before](https://user-images.githubusercontent.com/409245/43914999-46b71f76-9bbe-11e8-9882-24067cff11f8.png) #### After: ![after](https://user-images.githubusercontent.com/409245/43915004-4b121b2a-9bbe-11e8-9011-729dc004ecc0.png) #### Spec: [Text field guidelines](https://material-io-project.appspot.com/design/components/text-fields.html#spec) ![image](https://user-images.githubusercontent.com/409245/43916708-33e4b994-9bc3-11e8-8b95-b907d801630e.png)
- Loading branch information
Showing
8 changed files
with
161 additions
and
190 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
Oops, something went wrong.