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 8, 2018
1 parent b5b39eb commit 1eb8450
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/input/_input-theme.scss
Expand Up @@ -6,6 +6,9 @@


@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);
$is-dark-theme: map-get($theme, is-dark);

Expand All @@ -14,10 +17,21 @@
}

.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 1eb8450

Please sign in to comment.