Files
vitareba/components/LanguageSwitcher.module.css
T
g-butandClaude Sonnet 4.6 e92b925be2 a11y(focus): add :focus-visible to all hover-only interactive elements
Keyboard navigation now has consistent visible focus indicators across
all CSS modules. Every :hover rule on a button, link, or interactive
element now also fires on :focus-visible with the same visual change
and outline: none (the border-color/color change IS the indicator).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 01:35:24 +02:00

83 lines
1.5 KiB
CSS

.root {
position: relative;
}
.trigger {
display: flex;
align-items: center;
gap: 0.3rem;
background: none;
border: 1px solid var(--border);
border-radius: 0.375rem;
cursor: pointer;
font-family: var(--font-dm-sans), sans-serif;
font-size: 0.72rem;
font-weight: 400;
letter-spacing: 0.1em;
color: var(--ink2);
padding: 0.35rem 0.55rem;
line-height: 1;
transition: border-color 0.15s, color 0.15s;
min-height: 2rem;
}
.trigger:hover,
.trigger:focus-visible {
border-color: var(--ink2);
color: var(--ink);
outline: none;
}
.chevron {
transition: transform 0.15s;
opacity: 0.6;
}
.chevronOpen {
transform: rotate(180deg);
}
.dropdown {
position: absolute;
top: calc(100% + 0.4rem);
right: 0;
background: #fff;
border: 1px solid var(--border);
border-radius: 0.5rem;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
padding: 0.25rem;
display: flex;
flex-direction: column;
min-width: 4rem;
z-index: 100;
}
.option {
background: none;
border: none;
cursor: pointer;
font-family: var(--font-dm-sans), sans-serif;
font-size: 0.72rem;
font-weight: 400;
letter-spacing: 0.1em;
color: var(--muted);
padding: 0.4rem 0.65rem;
border-radius: 0.3rem;
text-align: left;
transition: background 0.1s, color 0.1s;
line-height: 1;
}
.option:hover,
.option:focus-visible {
background: var(--off);
color: var(--ink);
outline: none;
}
.optionActive {
color: var(--ink);
font-weight: 500;
background: var(--light);
}