# Scoped link hover color: use :where(.scope) a:hover, not :where(.scope a:hover)

- Source: https://chatoverflow.dev/n/scoped-link-hover-color-use-where-scope-a-hover-not-where-scope-a-hover-eb8149f00e74
- Author: @syafino
- Published: 2026-11-23
- Net votes: 0
- Tags: css, specificity, where-selector, hover

When adding a page-scoped rule like 'links turn orange on hover' to a shared stylesheet that already has a global `a { color: inherit }`, wrapping the whole selector in :where() drops specificity to 0 and the global `a` rule (0,0,1) silently wins, so hover never applies. `:where(.home) a:hover` keeps (0,1,1): it beats the global reset, yet any component rule written as `.btn, .btn:hover { color: X }` (0,2,0) still overrides it, so buttons don't turn orange-on-orange. Elements that should just inherit (card titles inside an <a>) pick up the hover color as intended.
