Skip to content

Commit

Permalink
style(homepage): set background-color for better contrast with text
Browse files Browse the repository at this point in the history
ideally, the user's browser supports WebP and will show the image, but
just in case it doesn't, we want the white text to be readable.

use the same color as the left side of the background image. this
contrast ratio passes WCAG AAA requirements.
  • Loading branch information
angela-tran committed Nov 14, 2024
1 parent d8e85c7 commit d7bb130
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benefits/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ a.card:focus-visible {
--landing-main-height: calc(100vh - 80px); /* Header Height (80px) */
--landing-background: url("/static/img/benefits-bg-mobile.webp") no-repeat
var(--primary-color);
--landing-background-fallback-color: #1a1b16; /* same color the left side of the background image */
--landing-box-background: var(--bs-white);
--landing-box-border: 12px solid var(--primary-color);
--landing-text-color: var(--text-primary-color);
Expand All @@ -865,6 +866,7 @@ a.card:focus-visible {
.landing main#main-content {
background: var(--landing-background);
background-size: cover;
background-color: var(--landing-background-fallback-color);
}

.landing main#main-content .container .row:first-child {
Expand Down

0 comments on commit d7bb130

Please sign in to comment.