Skip to content

fix(frontend): hide hamburger menu on desktop via Tailwind utilities#103

Merged
mhersson merged 2 commits into
mainfrom
ctxmax-514/hamburger-menu-for-mobile-devices-is-showing-on-de
May 18, 2026
Merged

fix(frontend): hide hamburger menu on desktop via Tailwind utilities#103
mhersson merged 2 commits into
mainfrom
ctxmax-514/hamburger-menu-for-mobile-devices-is-showing-on-de

Conversation

@contextmatrix-runner
Copy link
Copy Markdown
Contributor

Summary

  • The hamburger button in UtilityBar.tsx was always visible on all viewport sizes because .apd-hamburger in index.css set display: inline-flex without a @layer wrapper, which overrides Tailwind v4's md:hidden (inside @layer utilities) per the CSS Cascading Layers spec.
  • Removed the .apd-hamburger custom class from the button and replaced it with inline Tailwind utilities, matching the working pattern in AppHeader.tsx.
  • Restored all original interactive affordances in a follow-up subtask (CTXMAX-526): shrink-0, hover:bg-[var(--bg1)], focus-visible:ring-[var(--aqua)], transition-[opacity,background-color].
  • Removed the now-dead .apd-hamburger, .apd-hamburger:hover, and .apd-hamburger:focus-visible CSS rules from index.css.

Test plan

  • Visit the All Projects page at a desktop viewport (≥ 768px) — hamburger button should not be visible.
  • Resize to mobile viewport (< 768px) — hamburger button should appear and open the sidebar on click.
  • Verify focus ring is aqua (var(--aqua)) when button is focused via keyboard on mobile.
  • Verify hover shows background (var(--bg1)) and opacity change on mobile.
  • Confirm AppHeader hamburger (unrelated to this change) still works correctly at mobile width.
  • go test ./internal/... passes.

ContextMatrix Runner added 2 commits May 18, 2026 11:56
- Replace `apd-hamburger` class on UtilityBar button with Tailwind utilities
- Un-layered `.apd-hamburger { display: inline-flex }` in index.css overrode
  Tailwind v4's `md:hidden` at all viewport sizes due to CSS Cascading Layers
- New className uses `md:hidden` + inline Tailwind utilities, matching the
  AppHeader hamburger pattern where `md:hidden` works correctly
- Remove `.apd-hamburger`, `.apd-hamburger:hover`, and `.apd-hamburger:focus-visible`
  from index.css — class no longer used anywhere
… affordances

- Restore focus ring color to var(--aqua) per dashboard convention
- Restore hover:bg-[var(--bg1)] for visible hover feedback on mobile
- Add shrink-0 to prevent button compression in flex row
- Update transition to cover both opacity and background-color
@mhersson mhersson merged commit 09c9170 into main May 18, 2026
7 checks passed
@mhersson mhersson deleted the ctxmax-514/hamburger-menu-for-mobile-devices-is-showing-on-de branch May 18, 2026 12:53
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.

1 participant