Skip to content

Commit

Permalink
fix(form): TextArea disabled styles
Browse files Browse the repository at this point in the history
The placeholder text was still appearing for TextArea due to missing
some of the base text field styles. Since the code for the floating
state is the same between TextField and TextArea, the `&--floating`
state was moved to the `@mixin rmd-text-field-base`
  • Loading branch information
mlaursen committed Jul 7, 2020
1 parent e8f2c57 commit ef118bf
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions packages/form/src/text-field/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,6 @@
@include rmd-theme(color, text-disabled-on-background);
}
}
}

/// @access private
@mixin rmd-text-field {
@include rmd-utils-rtl {
@include rmd-form-theme(padding-left, text-padding-right);
@include rmd-form-theme(padding-right, text-padding-left);
}
@include rmd-form-theme(padding-left, text-padding-left);
@include rmd-form-theme(padding-right, text-padding-right);
@include rmd-form-theme(padding-top, text-padding-top);
@include rmd-text-field-base;

flex: 1 1 auto;
height: 100%;

&--floating {
@include rmd-text-field-placeholder {
Expand All @@ -282,6 +267,21 @@
}
}

/// @access private
@mixin rmd-text-field {
@include rmd-utils-rtl {
@include rmd-form-theme(padding-left, text-padding-right);
@include rmd-form-theme(padding-right, text-padding-left);
}
@include rmd-form-theme(padding-left, text-padding-left);
@include rmd-form-theme(padding-right, text-padding-right);
@include rmd-form-theme(padding-top, text-padding-top);
@include rmd-text-field-base;

flex: 1 1 auto;
height: 100%;
}

/// @access private
@mixin rmd-text-field-addon {
@include rmd-icon-theme(height, size);
Expand Down Expand Up @@ -354,19 +354,6 @@
flex: 1 1 auto;
height: 100%;

&--floating {
@include rmd-text-field-placeholder {
color: transparent;
transition: color $rmd-transition-standard-time;
}

&:focus {
@include rmd-text-field-placeholder {
@include rmd-theme(color, text-secondary-on-background);
}
}
}

&--rh {
resize: horizontal;
}
Expand Down

0 comments on commit ef118bf

Please sign in to comment.