Skip to content

fix(tools): drop the hover gate on tool cards - #47

Merged
yungsamd17 merged 1 commit into
mainfrom
revert/hover-gate
Oct 21, 2026
Merged

yungsamd17 merged 1 commit into
mainfrom
revert/hover-gate

Conversation

@yungsamd17

Copy link
Copy Markdown
Member

Reverts the hover gate added to the tool cards in #44.

What was wrong

Gating .tool-item:hover behind @media (hover: hover) silences the card's hover reaction wherever the browser reports hover: none — touch devices, and desktop browsers in device emulation. There the accent wash, the border tint and the arrow nudge never appear at all, so the cards read as inert.

The gate was meant to stop the wash sticking after a tap on touch, but it costs the reaction in every environment that reports hover: none, which is the common case for a mouse user in device emulation.

What changed

  • src/styles/tool.css — the hover rules come back out of the media query, so the reaction is ungated again. :focus-visible stays on the arrow so keyboard focus still moves it.

The tool card CSS ends up identical to main before #44 landed, apart from PR #44's own token and header changes.

Testing

  • npx astro check — 0 errors
  • npm run build — 12 pages, clean
  • Compiled CSS has no hover:hover gate left; .tool-item:hover and .tool-item:hover .tool-item-arrow are ungated
  • .tool-item:focus-visible .tool-item-arrow still moves the arrow

Note

This gives up #45's "stop sticky card hover on touch" protection. If that is wanted back, it needs a check that does not depend on the hover media query — a pointerType check in JS would distinguish a real mouse in device emulation from a genuine touch, which the media query cannot.

Built with minimax-m3.1-flash-free in the OpenCode harness.

Gating `.tool-item:hover` behind `@media (hover: hover)` silences the
card's hover reaction wherever the browser reports `hover: none` —
touch devices, and desktop browsers in device emulation. There the
accent wash, the border tint and the arrow nudge never appear at all,
so the cards read as inert.

The gate was meant to stop the wash sticking after a tap on touch, but
it costs the reaction in every environment that reports `hover: none`,
which is the common case for a mouse user in device emulation.

Take the rules back out of the media query so the hover reaction is
ungated again, and keep `:focus-visible` on the arrow so keyboard
focus still moves it.
@github-actions

Copy link
Copy Markdown

✅ PR Checks passed

Typecheck (npx astro check) and production build both green.

@yungsamd17
yungsamd17 merged commit d0cac19 into main Oct 21, 2026
2 checks passed
@yungsamd17
yungsamd17 deleted the revert/hover-gate branch October 21, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant