Show the pressed state on button groups

A button with aria-pressed="true" inside .nv-button-group is now drawn
pressed into the surface in the brand colour, so the appearance toggle and
any segmented choice show which option is in use. Previously no state was
visible.

Checked the four example apps in the reworked light theme.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-28 09:36:26 +01:00
commit 06fca1c385
3 changed files with 21 additions and 1 deletions

View file

@ -312,3 +312,13 @@
z-index: 1;
translate: none;
}
/* The chosen segment is a key held down: pressed into the surface, in the
brand colour, rather than a flat wash. This is what makes the appearance
toggle (and any segmented choice) show which option is in use. */
.nv-button-group > .nv-button[aria-pressed="true"] {
background-color: var(--nv-color-accent-subtle);
background-image: none;
color: var(--nv-color-accent-text);
box-shadow: var(--nv-elevation-inset-sm), var(--nv-ledge);
}