Repository navigation
feat(ui): release 5.4.0 with grey menu highlights, focus-ring table rows and a nav offset - #223
Merged
Merged
Conversation
…ws and a nav offset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on touch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Need
Guardian carries overrides on four Equality components that Equality should own: menus that light purple against the grey the rest of the app now uses, a command list that shows nothing as you arrow through it, a table row focus drawn twice, once in the pale brand lilac (about 2.3:1 on white), and a nav that can't sit under a sticky header without its scrollers being re-pinned by hand.
Problem
dropdown-item-hoverfills a hovered or focusedDropdownMenu,SelectorCommanditem lilac at 50%, with lilac text and a shadow.CommandItemlights only on:hover. cmdk marks the keyboard's item withdata-selected, which nothing styles.Tablerow's focus outline isoutline-brand-primary, where every other control uses--color-focus-ring. The stretched link that covers the row never turns its own outline off either, so the browser draws a second ring just outside the row..nav-scrollerpins attop: 0withmax-height: min(100dvh, 100%), so under a sticky header it slides beneath it. Beside a rail and with a mouse, the panel's 32px switcher heading centres 4px above the rail's 40px first item; on touch both are 44px and already level.Change
bg-list-item-hover, the same as Nav andTable, with no lilac text or shadow. Danger and warning items keep their own colours.CommandItemlights ondata-[selected=true], which cmdk sets from both the keyboard and the pointer.Tablerow's focus outline isoutline-focus-ring, and its stretched link draws none, so focus shows as one line.--eq-nav-offset, registered with@propertyas a length (initial0px, inherited): the rail and panel pin that far down, and their height shrinks to match. Registration keeps a bare0valid inside the scroller'scalc(), and lets a value set aboveThemeProviderreach the nav in scoped mode, so it isn't a decision. Documented under Nav › Examples › Under a Sticky Header (set it on the element around the sidebar, not:root, or a Sheet inherits it), and in the agent skill's Nav line.NavPanelthat follows aNavRailgets half the difference between the rail item and the heading as top padding, each at least a touch target: 4px with a mouse, 0 on touch. A panel with no rail beside it, such as the docs sidebar, is unchanged.Minor release, 5.4.0, for the new variable.
Evidence
Dark mode, before | after.
Menu highlight (a

SelectorDropdownMenuitem under the pointer)Command list from the keyboard (an item arrowed to)

Table row keyboard focus (two lines become one)

Nav under a sticky header (switcher centred on the rail's first icon)

Built into Guardian with its four overrides removed (the nav offset and switcher stopgaps in
app-layout.tsx, and app search'sCommandItemhover and selected classes): its nav, app shell and current-item fill specs pass, 39 cases, including the check that the panel's scroller starts under the header and the switcher centres within 1px of the rail's first icon. Measured there, the switcher and the rail's first icon share a centre with a mouse, on a touch desktop, and in the phone Sheet on touch. New compiled-CSS tests cover the offset's registration and use, the switcher padding with a mouse and on touch,CommandItem's selected fill, and the table row's single outline; each fails against the old CSS. UI tests (199), lint and Prettier pass.Not covered
html :-moz-focusring { outline: auto }still draws on sort headers. It needs a Firefox check first, since many controls draw focus with a box-shadow and don't turn the outline off.🤖 Generated with Claude Code