From 3e0221b149cc23dd21a75fa22c9098ec55d875db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Tue, 11 Aug 2026 17:53:36 +0200 Subject: [PATCH] docs: specify mobile menu active contrast --- ...8-11-mobile-menu-active-contrast-design.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/superpowers/specs/2026-08-11-mobile-menu-active-contrast-design.md diff --git a/docs/superpowers/specs/2026-08-11-mobile-menu-active-contrast-design.md b/docs/superpowers/specs/2026-08-11-mobile-menu-active-contrast-design.md new file mode 100644 index 0000000..be82493 --- /dev/null +++ b/docs/superpowers/specs/2026-08-11-mobile-menu-active-contrast-design.md @@ -0,0 +1,42 @@ +# Mobile Menu Active Contrast Design + +## Context + +The active navigation link in the mobile portal menu uses Tailwind's +`text-background` utility. The project also defines an unlayered global +`a { color: inherit; }` rule. Unlayered CSS outranks Tailwind utilities in the +cascade, so the link inherits the surrounding text color instead of using the +intended inverse color. This produces dark text on a dark active background in +light mode and the corresponding low-contrast result in dark mode. + +## Design + +Give the active mobile navigation link one semantic class owned by the mobile +menu component. Define that class in the existing global stylesheet, outside +Tailwind's utility layer, with the portal's established inverse theme tokens: + +- background: `var(--ink)` +- text: `var(--paper)` + +The existing tokens already reverse with the selected theme. The result is a +dark surface with white text in light mode and a light surface with black text +in dark mode. Inactive links, menu spacing, motion, routing, and interaction +remain unchanged. + +## Verification + +Extend the existing mobile-menu component test to assert that the active link +receives the semantic contrast class while an inactive link does not. Observe +the new test fail before adding the production class, then pass after the CSS +and component changes. Run the focused test, all source tests, TypeScript, +ESLint, and the production webpack build. + +## Scope + +This change is limited to: + +- `src/components/layout/mobile-portal-menu.tsx` +- `src/components/layout/mobile-portal-menu.test.tsx` +- `src/app/globals.css` + +No theme tokens, desktop navigation, or other link styles will be changed.