From 896174a1ac6d0a290c726fa27a77d439b8075dd2 Mon Sep 17 00:00:00 2001 From: SamiraMSadat <108487505+SamiraMSadat@users.noreply.github.com> Date: Fri, 5 Jul 2024 17:13:08 -0600 Subject: [PATCH] VOTE-2234: add high contrast breadcrumb style (#815) --- .../custom/votegov/src/sass/mixins/mixins.scss | 13 ++++++++++--- .../src/sass/uswds-overrides/usa-breadcrumb.scss | 4 +--- .../src/sass/uswds-overrides/usa-identifier.scss | 14 +------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/web/themes/custom/votegov/src/sass/mixins/mixins.scss b/web/themes/custom/votegov/src/sass/mixins/mixins.scss index c63d0aff5..deb0c7aed 100644 --- a/web/themes/custom/votegov/src/sass/mixins/mixins.scss +++ b/web/themes/custom/votegov/src/sass/mixins/mixins.scss @@ -158,16 +158,23 @@ @mixin vote-link-dark { @include u-text('underline'); - color: $base-white; + --vote-link--color: #{$base-white}; + --vote-link-hover--color: #{$ac-cool-light}; + color: var(--vote-link--color); + + [data-theme="contrast"] & { + --vote-link--color: #{$base-white}; + --vote-link-hover--color: #{$btn-secondary-bg-high-contrast-hover}; + } &:visited { - color: $base-white; + color: var(--vote-link--color); } @include hover { @include u-text('underline'); background-color: transparent; - color: $ac-cool-light; + color: var(--vote-link-hover--color); } } diff --git a/web/themes/custom/votegov/src/sass/uswds-overrides/usa-breadcrumb.scss b/web/themes/custom/votegov/src/sass/uswds-overrides/usa-breadcrumb.scss index 2cd2cd79d..332542cb0 100644 --- a/web/themes/custom/votegov/src/sass/uswds-overrides/usa-breadcrumb.scss +++ b/web/themes/custom/votegov/src/sass/uswds-overrides/usa-breadcrumb.scss @@ -6,9 +6,7 @@ } .usa-breadcrumb__link { - .page-masthead & { - @include vote-link-dark; - } + @include vote-link-dark; } // targeting the div wrapping the breadcrumb block and add margin top to the following element diff --git a/web/themes/custom/votegov/src/sass/uswds-overrides/usa-identifier.scss b/web/themes/custom/votegov/src/sass/uswds-overrides/usa-identifier.scss index c96b9efbf..5e79d1895 100644 --- a/web/themes/custom/votegov/src/sass/uswds-overrides/usa-identifier.scss +++ b/web/themes/custom/votegov/src/sass/uswds-overrides/usa-identifier.scss @@ -5,14 +5,10 @@ .usa-identifier { // Default to USWDS colors --usa-identifier-bg: #{color('base-darkest')}; - --usa-identifier-link: #{color('base-light')}; - --usa-identifier-link-hover: #{color('base-lighter')}; background-color: var(--usa-identifier-bg); [data-theme="contrast"] & { --usa-identifier-bg: #{$bg-high-contrast}; - --usa-identifier-link: #{$base-white}; - --usa-identifier-link-hover: #{$link-high-contrast-hover-blue}; } } @@ -20,14 +16,6 @@ .usa-identifier__required-link.usa-link, .usa-identifier__identity-disclaimer a, .usa-identifier__container a { - color: var(--usa-identifier-link); - - &:visited { - color: var(--usa-identifier-link); - } - - @include hover { - color: var(--usa-identifier-link-hover); - } + @include vote-link-dark; }