Skip to content

Commit

Permalink
fix: contrast for active navigation (nolanlawson#2274)
Browse files Browse the repository at this point in the history
Increase the background contrast for the selected page.
Increase the prominance of the indictor bar so we dont need to rely on
the background to have a strong contrast difference.
  • Loading branch information
NickColley authored and alice-werefox committed Apr 3, 2023
1 parent cc3cd97 commit 77d309f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/scss/themes/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
--form-border: #{darken($border-color, 10%)};

--nav-bg: #{$main-theme-color};
--nav-active-bg: #{lighten($main-theme-color, 9%)};
--nav-active-bg: #{lighten($main-theme-color, 3%)};
--nav-border: #{darken($main-theme-color, 10%)};
--nav-a-border: #{$main-theme-color};
--nav-a-selected-border: #{$secondary-text-color};
--nav-a-selected-bg: #{lighten($main-theme-color, 10%)};
--nav-a-selected-active-bg: #{lighten($main-theme-color, 17%)};
--nav-a-selected-bg: #{lighten($main-theme-color, 3%)};
--nav-a-selected-active-bg: var(--nav-a-selected-bg-hover);
--nav-svg-fill: #{$secondary-text-color};
--nav-text-color: #{$secondary-text-color};
--nav-indicator-bg: #{rgba($secondary-text-color, 0.8)};
--nav-indicator-bg-hover: #{rgba($secondary-text-color, 0.85)};
--nav-indicator-bg-hover: #{rgba($secondary-text-color, 0.6)};

--nav-a-selected-border-hover: #{$secondary-text-color};
--nav-a-selected-bg-hover: #{lighten($main-theme-color, 15%)};
--nav-a-bg-hover: #{lighten($main-theme-color, 5%)};
--nav-a-border-hover: #{$main-theme-color};
--nav-a-selected-bg-hover: #{lighten($main-theme-color, 4.5%)};
--nav-a-bg-hover: #{lighten($main-theme-color, 1.5%)};
--nav-a-border-hover: #{rgba($secondary-text-color, 0.6)};
--nav-svg-fill-hover: #{$secondary-text-color};
--nav-text-color-hover: #{$secondary-text-color};

Expand Down
7 changes: 3 additions & 4 deletions src/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
//

--nav-font-size: 1rem;
--nav-indicator-height: 2px;
--nav-indicator-height: 3px;
--nav-border-bottom: 0px;
--nav-icon-pad-v: 15px;
--nav-icon-pad-v: 14px;
--nav-icon-pad-h: 20px;
--nav-icon-size: 20px;

Expand All @@ -46,10 +46,9 @@
--main-border-size: 1px;

@media (max-width: 991px) {
--nav-icon-pad-v: 20px;
--nav-icon-pad-v: 18px;
--nav-icon-pad-h: 10px;
--nav-icon-size: 25px;
--nav-indicator-height: 3px;
--nav-border-bottom: 0px;
}

Expand Down

0 comments on commit 77d309f

Please sign in to comment.