Skip to content

Commit

Permalink
fix(text-field): correctly resizes when setting width
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 465164744
  • Loading branch information
asyncLiz authored and copybara-github committed Aug 3, 2022
1 parent d1fb068 commit 7285b3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions field/lib/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ $_enter-delay: $_label-duration - $_visible-duration;
//
// See https://www.w3.org/TR/css-flexbox-1/#baseline-participation
align-self: baseline;
flex: 1;
}

.md3-field__content {
Expand Down
1 change: 1 addition & 0 deletions field/lib/_field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

.md3-field {
display: inline-flex;
flex: 1;
flex-direction: column;
// Allow the use of block/inline reflexive RTL properties without impacting
// structure when languages change.
Expand Down
6 changes: 6 additions & 0 deletions textfield/lib/_text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
outline: none;
}

.md3-text-field {
display: inline-flex;
flex: 1;
}

.md3-text-field__field {
cursor: text;
flex: 1;

.md3-text-field--disabled & {
cursor: default;
Expand Down

0 comments on commit 7285b3a

Please sign in to comment.