Skip to content

Commit

Permalink
fix(input): align caret color with spec (#8692)
Browse files Browse the repository at this point in the history
Based on the text field spec (https://material.io/guidelines/components/text-fields.html), the input caret color should match the underline color.
  • Loading branch information
crisbeto authored and jelbourn committed Jan 4, 2018
1 parent e20d8f0 commit b0449ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/input/_input-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,31 @@


@mixin mat-input-theme($theme) {
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);
$warn: map-get($theme, warn);
$foreground: map-get($theme, foreground);

.mat-input-element:disabled {
color: mat-color($foreground, disabled-text);
}

.mat-input-element {
caret-color: mat-color($primary);

@include input-placeholder {
color: _mat-control-placeholder-color($theme);
}
}

.mat-accent .mat-input-element {
caret-color: mat-color($accent);
}

.mat-warn .mat-input-element,
.mat-form-field-invalid .mat-input-element {
caret-color: mat-color($warn);
}
}

@mixin mat-input-typography($config) {
Expand Down

0 comments on commit b0449ab

Please sign in to comment.