Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(design): inverse menu highlight + increase contrast #11061

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 3, 2024

Summary

(MP-1103)

Problem

  1. The contrast of the highlighted menu item is too low in the light theme.
  2. The menu highlights the current page by effectively reducing its opacity, which is counter-intuitive.

Solution

Inverse the menu highlighting, reducing the opacity of the inactive items using opacity: 0.775, and increasing the contrast of the active item by switching from --text-secondary to --text-primary, which is the same color used for the MDN logo.

Note: Also removes the --text-active variable, which is no longer used.


Screenshots

Theme Before After
Light image image
Dark image image

How did you test this change?

Ran yarn dev and compared http://localhost:3000/en-US/docs/Learn locally against https://developer.mozilla.org/en-US/docs/Learn.

Dark theme: 4.67 (menu) / 5.31 (curriculum module list tabs).
Light theme: 4.51 (menu / curriculum module list tabs).
Active item gets darker (light theme) or brighter (dark theme) color.
@caugner caugner requested a review from a team as a code owner May 3, 2024 11:46
@caugner caugner changed the title enhance(design): inverse menu highlight + increase inactive item contrast enhance(design): inverse menu highlight + increase contrast May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant