Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(input): correct invalid colors #4771

Merged
merged 2 commits into from
May 26, 2017

Conversation

willshowell
Copy link
Contributor

Fixes #4651

cc @mmalerba

It was all related to specificity issues, so I decreased the specificity of .mat-input-ripple's background-color and increased it for .mat-input-placeholder's and .mat-placeholder-required's color.

Also, I am unsure as to what the correct behavior for the required asterisk is. Previously, it was accent while floating for all (primary, accent, warn) inputs. It was only warn when invalid and not focused. I chose to ensure it is warn at all times when invalid, but can revert if that's contrary to the spec.

- Make ripple & placeholder use warn color even with .mat-accent class
- Make req'd asterisk warn color whenever input is invalid
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 24, 2017
.mat-placeholder-required {
color: $input-underline-color-warn;
.mat-input-placeholder {
&, &.mat-accent, &.mat-float .mat-placeholder-required {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you put each selector on its own line (makes it obvious that there's multiple and not one complex one).

also I think we can't have rules that end with & in our theme files, so maybe:

.mat-input-placeholder {
  color: $input-underline-color-warn;

  &.mat-accent,
  &.mat-float .mat-placeholder-required {
    color: $input-underline-color-warn;
  }
}

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker labels May 24, 2017
@tinayuangao tinayuangao merged commit 2103907 into angular:master May 26, 2017
@willshowell willshowell deleted the fix/warning-underline branch May 26, 2017 21:59
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accent inputs show wrong underline color when invalid
4 participants