Code-dot-mil / code.mil

An experiment in open source at the Department of Defense.
https://www.code.mil
MIT License
1.28k stars 122 forks source link

Check email link text color #234

Closed jgarber623-gov closed 5 years ago

jgarber623-gov commented 6 years ago

It's light grey for some reason! πŸ€·β€β™‚οΈ

It should be white.

screen shot 2018-07-10 at 2 57 04 pm
josephwhittington commented 5 years ago

I will be working in this issue

milovanderlinden commented 5 years ago

Add

.usa-section-dark a {
  color: #fff !important;
}

to custom.css and you are good to go.

jordangov commented 5 years ago

Hmm... we could... but using !important is not a good approach generally in CSS. It means if we ever need to overwrite that style we'd have to use yet another !important later in the css. I'd rather find a solution to why that button is gray and the other is white.

milovanderlinden commented 5 years ago

That button is gray because it is defined like that in the uswds main.css

jordangov commented 5 years ago

But why is the other button not gray? In any case, we can override the styles without using !important, it's really a nuclear option that should be avoided.

jgarber623-gov commented 5 years ago

Dug into this for a minute and, despite Chrome Inspector's ordering of applied CSS rules, it appears that this rule is the dominant:

.usa-section-dark a {
  color: #d6d7d9;
}

That rule appears toward the bottom of main.css and has the same or slightly higher specificity as other rules applying color to this element. πŸ™ƒ

jgarber623-gov commented 5 years ago

Fixed in a39b566 by adding:

class: page-home

...to the index.md file and the following to custom.css:

.page-home .usa-section-dark .usa-button {
  color: #fff;
}

πŸ‡ΊπŸ‡Έ