Skip to content
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/input): uncessary scroll bar on auto-resize textarea in some cases #21619

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/material/form-field/form-field-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
// placeholder, the alignment should be inherited here.
text-align: inherit;

// It's common for developers to set `box-sizing: border-box` on every element on the page.
// Reset it to `content-box` since all of our styles are written with it in mind. `border-box`
// can also cause unnecessary scrollbars on auto-resizing textareas (see #21560).
box-sizing: content-box;

// Undo the red box-shadow glow added by Firefox on invalid inputs.
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid
&:-moz-ui-invalid {
Expand Down