From 452a0cc2576fd35253c7502b30a4fe82651c9fa0 Mon Sep 17 00:00:00 2001 From: James Mejia Date: Wed, 21 Apr 2021 12:15:58 -0500 Subject: [PATCH 1/5] Create test for sidenav current links and buttons. --- src/components/test/sidenav-button.njk | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/components/test/sidenav-button.njk diff --git a/src/components/test/sidenav-button.njk b/src/components/test/sidenav-button.njk new file mode 100644 index 0000000000..431b9ace42 --- /dev/null +++ b/src/components/test/sidenav-button.njk @@ -0,0 +1,50 @@ +
+

Incorrect text color on current items in sidenav

+

+ Based on this issue. Added buttons to make sure there are no regressions related to buttons. +

+ +
From 5201e3c56ac25e3d7044fc65056ced6067e27f38 Mon Sep 17 00:00:00 2001 From: James Mejia Date: Wed, 21 Apr 2021 12:16:41 -0500 Subject: [PATCH 2/5] Only style basic links (not current or button). --- src/stylesheets/core/mixins/_nav-list.scss | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/stylesheets/core/mixins/_nav-list.scss b/src/stylesheets/core/mixins/_nav-list.scss index 7be0ff5914..c5d03e2d32 100644 --- a/src/stylesheets/core/mixins/_nav-list.scss +++ b/src/stylesheets/core/mixins/_nav-list.scss @@ -19,16 +19,23 @@ $sidenav-level-4-inset: 8; } a:not(.usa-button) { - color: color("base-dark"); display: block; padding: units(1) units($sidenav-level-1-inset); text-decoration: none; &:hover { background-color: color("base-lightest"); - color: color("primary"); text-decoration: none; } + } + + + a:not(.usa-button):not(.usa-current) { + color: color("base-dark"); + + &:hover { + color: color("primary"); + } &:focus { outline-offset: 0; From a0d62feb35014b17b769149b98e3b0a3c9471eaf Mon Sep 17 00:00:00 2001 From: James Mejia Date: Wed, 21 Apr 2021 12:46:35 -0500 Subject: [PATCH 3/5] Remove extra return. --- src/stylesheets/core/mixins/_nav-list.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stylesheets/core/mixins/_nav-list.scss b/src/stylesheets/core/mixins/_nav-list.scss index c5d03e2d32..ad158b8467 100644 --- a/src/stylesheets/core/mixins/_nav-list.scss +++ b/src/stylesheets/core/mixins/_nav-list.scss @@ -29,7 +29,6 @@ $sidenav-level-4-inset: 8; } } - a:not(.usa-button):not(.usa-current) { color: color("base-dark"); From 2c3b7e0925432e36191ac9d69639b9a7c105a630 Mon Sep 17 00:00:00 2001 From: Dano Williams Date: Mon, 26 Apr 2021 09:56:38 -0700 Subject: [PATCH 4/5] Use link color setting for sidenav highlight --- src/stylesheets/core/mixins/_nav-list.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stylesheets/core/mixins/_nav-list.scss b/src/stylesheets/core/mixins/_nav-list.scss index ad158b8467..89bcff254e 100644 --- a/src/stylesheets/core/mixins/_nav-list.scss +++ b/src/stylesheets/core/mixins/_nav-list.scss @@ -33,7 +33,7 @@ $sidenav-level-4-inset: 8; color: color("base-dark"); &:hover { - color: color("primary"); + color: color($theme-link-color); } &:focus { @@ -44,19 +44,19 @@ $sidenav-level-4-inset: 8; .usa-current { @include add-bar( $theme-sidenav-current-border-width, - "primary", + $theme-link-color, "left", "pill", 0.5, 0.5 ); - color: color("primary"); + color: color($theme-link-color); font-weight: font-weight("bold"); @include at-media("tablet") { @include add-bar( $theme-sidenav-current-border-width, - "primary", + $theme-link-color, "left", "pill", 0, From 6d9e89f8e2987812c0012a59eeacdea4b15f9752 Mon Sep 17 00:00:00 2001 From: Dano Williams Date: Mon, 26 Apr 2021 09:57:03 -0700 Subject: [PATCH 5/5] Remove stray debug code --- src/stylesheets/core/mixins/_nav-list.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stylesheets/core/mixins/_nav-list.scss b/src/stylesheets/core/mixins/_nav-list.scss index 89bcff254e..86387a9616 100644 --- a/src/stylesheets/core/mixins/_nav-list.scss +++ b/src/stylesheets/core/mixins/_nav-list.scss @@ -95,7 +95,6 @@ $sidenav-level-4-inset: 8; // level 4+ & & & a:not(.usa-button) { - content: "foobar"; padding-left: units($sidenav-level-4-inset); } }