Skip to content

Commit

Permalink
fix(text-field): Update typography to subtitle1. Updated height and p…
Browse files Browse the repository at this point in the history
…adding. (#2606)

Adjusted the typography style to use subtitle1. Adjusted the height and padding to accommodate the larger line-height on subtitle1.
  • Loading branch information
williamernest committed Apr 20, 2018
1 parent 3d8a27b commit 127375e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/mdc-textfield/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@

.mdc-text-field__input {
display: flex;
height: 30px;
padding: 12px;
border: none;
background-color: transparent;
Expand Down
14 changes: 3 additions & 11 deletions packages/mdc-textfield/mdc-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,16 @@
}

.mdc-text-field__input {
@include mdc-typography-base;
// We use only a subset of the MDC typography values here as changing things such as line-height
// affects how the labels are transformed.
// TODO: Re-add setting the font-size from mdc-typography-styles (currently
// setting it here has no effect because it is overriden by the font-size
// given below).
@each $prop in (letter-spacing) {
#{$prop}: map-get(map-get($mdc-typography-styles, subtitle1), $prop);
}
@include mdc-typography(subtitle1);

width: 100%;
padding: 20px 0 8px;
height: 30px;

This comment has been minimized.

Copy link
@robbyrice

robbyrice Apr 24, 2018

Contributor

This change restricts textarea inputs to a height of 30px, regardless of the row="" attribute that is set in the html on the page, preventing the textarea from expanding.

This comment has been minimized.

Copy link
@chaficnajjar

chaficnajjar May 8, 2018

Contributor

@robbyrice They fixed it in v0.35.1 (#2638) 🎉

padding: 20px 0 1px;
transition: mdc-text-field-transition(opacity);
border: none;
border-bottom: 1px solid;
border-radius: 0;
background: none;
font-size: inherit;
appearance: none;

&::placeholder {
Expand Down

2 comments on commit 127375e

@bbisinger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing padding: 20px 0 8px; to padding: 20px 0 1px; causes text entered in the textbox to intersect the bottom line.

@lucacasonato
Copy link

@lucacasonato lucacasonato commented on 127375e Aug 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this still happens.

Please sign in to comment.