Skip to content

Commit

Permalink
fix(text-field): Update outline and label styles according to spec (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bonniezhou committed Jan 3, 2018
1 parent 2f9dd6f commit 6ada786
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-textfield/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $mdc-text-field-dark-background: rgba(48, 48, 48, 1);
$mdc-text-field-dark-label: rgba(white, .6);
$mdc-text-field-dark-placeholder: rgba(white, .3);
$mdc-text-field-light-background: rgba(white, 1);
$mdc-text-field-light-label: rgba(white, .7);
$mdc-text-field-light-label: rgba(black, .6);
$mdc-text-field-light-placeholder: rgba(black, .38);

$mdc-text-field-box-background: rgba(black, .04);
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-textfield/label/mdc-text-field-label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
left: 0;
transform-origin: left top;
transition: mdc-text-field-transition(transform), mdc-text-field-transition(color);
color: $mdc-text-field-underline-on-light-idle;
color: $mdc-text-field-light-label;
cursor: text;

// stylelint-disable plugin/selector-bem-pattern
Expand Down
13 changes: 11 additions & 2 deletions packages/mdc-textfield/mdc-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@
z-index: 2;

&--float-above {
@include mdc-theme-prop(color, primary);

transform: scale(.75) translateY(-170%);

&.mdc-text-field__label--shake {
Expand All @@ -173,6 +171,17 @@
stroke-width: 2px;
}

&:not(.mdc-text-field--invalid) {
&.mdc-text-field--focused .mdc-text-field__label {
@include mdc-theme-prop(color, primary);
}

// stylelint-disable-next-line selector-max-specificity
.mdc-text-field__input:hover ~ .mdc-text-field__outline .mdc-text-field__outline-path {
stroke: $mdc-text-field-outlined-hover-border;
}
}

&.mdc-text-field--disabled {
@include mdc-theme-prop(color, $mdc-text-field-light-placeholder);

Expand Down

0 comments on commit 6ada786

Please sign in to comment.