-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material-experimental/mdc-form-field): fix outline notch width #23005
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,15 @@ | |
@mixin private-text-field-textarea-overrides() { | ||
// Ensures that textarea elements inside of the form-field have proper vertical spacing | ||
// to account for the floating label. Also ensures that there is no vertical text overflow. | ||
.mat-mdc-textarea-input { | ||
// **Note**: Before changing this selector, make sure the `cdk-textarea-autosize` class is | ||
// still able to override the `resize` property to `none`. | ||
.mat-mdc-form-field-textarea-control { | ||
// Set the vertical alignment for textareas inside form fields to be the middle. This | ||
// ensures that textareas do not stretch the infix container vertically without having | ||
// multiple rows of text. See: https://github.com/angular/components/pull/22089. | ||
vertical-align: middle; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure this doesn't mess up prefix/suffix icon alignment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated to this PR (can be observed in Miles' form-field demo too; https://mmalerba-demo-1.web.app/mdc-input). I'll have a look at this in a separate PR; it's also observable on the MDC textfield itself but not as obvious. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I've noticed that extra line before too, it comes from the MDC styles. I remember having a similar issue back when I was writing our outline form field too. |
||
// Textareas by default also allow users to resize the textarea horizontally. This | ||
// causes the textarea to overflow the form-field. We only allow vertical resizing. | ||
resize: vertical; | ||
box-sizing: border-box; | ||
height: auto; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think changing these selectors broke some of the typography. I'm seeing a few screenshots in g3 where the font changed. Can we change them back?