ethereum / ethereum-org-website

Ethereum.org is a primary online resource for the Ethereum community.
https://ethereum.org/
MIT License
5.09k stars 4.83k forks source link

refactor: menu color tokens #13926

Closed wackerow closed 1 month ago

wackerow commented 1 month ago

Description

Proposal: Migrate our "menu" tokens to tokens that are more generalizable.

Instead of declaring a whole array of specific "menu" tokens, with different level numbers, this PR suggests adding the additional shades of gray that are needed as additional background token shades.

We currently only have background and background-highlight for background tokens. This would add low, medium and high background variants to be used as layers to any stack (ie. nested menus, nested accordions, or any other nested elements).

These tokens were then used directly at the component level, updating and removing the existing usage of "menu-x-(active-)background" with the new corresponding background token.

Similar approach with text, but unsure of potential naming convention here. Went with a nested approach under "body" as "body-menu-DEFAULT/low/medium/high"

Shade update: This also fixes the shade that was --menu-1-active-background: var(--gray-150); to now use --background-low: var(--gray-100); in light mode:

image

Related Issue

Design system; theming updates

netlify[bot] commented 1 month ago

Deploy Preview for ethereumorg ready!

Name Link
Latest commit d589a914d3284ae1dd723eff355908ac1f8a9c1a
Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66f1e38e32198c0008238121
Deploy Preview https://deploy-preview-13926--ethereumorg.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
7 paths audited
Performance: 45 (πŸ”΄ down 1 from production)
Accessibility: 93 (no change from production)
Best Practices: 89 (πŸ”΄ down 9 from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

wackerow commented 1 month ago

Pulled in; Removed TODO's and updated design system in Figma... Will chat about and address the naming adjustments separately.