question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

md-hint add color property

See original GitHub issue

This is a feature. It would be really nice to use the color property like on md-button to determine which hints are warnings, accents or primary etc… I’m using the hints for both showing validation errors and anything related to the users input.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
gvlekkecommented, Feb 10, 2017

I think it’s also good to have a color option on md-hint, but I think its better that you can set a error color in the theme file. Material2 itself should apply the error color on the hint and the md-input-underline. Just like https://material.io/guidelines/patterns/errors.html#errors-user-input-errors

For now I’m creating a css file that does that based on the ng-dirty and ng-invalid classes.

md-hint
  font-weight: lighter
  color: #A1A1A1

md-input-container.ng-dirty.ng-invalid
  .md-input-underline
    border-top-width: 2px
    border-color: #D50000

    .md-input-ripple
      background-color: #D50000

  md-hint
    color: #D50000

should i create a new issue: “add error styling to inputs” ?

4reactions
kamarouskicommented, Feb 25, 2017

Out of the box styling solution for invalid inputs and error messages would be great.

Color property for md-hint would definitely help a lot as everybody now need to write custom css to achieve this common task. Or maybe a separate md-error component.

Hopefully this will be considered before final release.

That’s how I currently style it using theme warn color:

@import '~@angular/material/core/theming/all-theme';
@import './_custom-theme.scss';

.mat-hint {
    &.error {
        color: mat-color($custom-warn);
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Everything about the color Mint - Canva
Fresh and icy, mint is a light, vibrant shade of green. Its hex code is #3EB489. Named after the plant, mint has a...
Read more >
[SOLVED] Change Color Of Top Panel - Linux Mint Forums
How do I add color to the top panel? Thanks ... just right click the panel, go to "properties" then click on the...
Read more >
25 Colors to Pair With Mint Decor - House Beautiful
The Colors to Pair With Mint: White, beige, violet, and royal blue. Our Mint Green Shopping Pick: Pottery Barn Morgan Duvet, $3. BUY...
Read more >
Mint green - Converting Colors
The CSS property to change the color of the text to Hex 98FF98 is called "color". The color property can be set on...
Read more >
The 12 Best Colors That Go With Mint Green
1. Mint Green and Gray: Sophisticated Elegance. Add a touch of sophistication to your mint green color when you add a dash (or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found