Repository navigation
Conversation
Private --_--* variables now hold plain defaults that modifiers change, and the public --g-list-item-view-* variables are resolved where a value is used. The isContainer modifier no longer zeroes paddings set through the CSS API, so MenuItem sets its paddings with --g-list-item-view-padding-* again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview is ready. |
|
🎭 Component Tests Report is ready. |
…the edge The theme text colour no longer applies to a disabled item, so it gets the colour of a disabled row. A title that wraps starts at the edge instead of being centred like the text of a button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Visual tests for the sizes and paddings of items, the themes (also disabled), selection, alignment of items without an icon or an arrow, links, hover, keyboard navigation, the popup and a submenu, in the light and dark themes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| @media (hover: hover) { | ||
| &:not(&_hovered_no):hover { | ||
| --_--background-color: var(--_--background-color-hover); | ||
| background: var( |
There was a problem hiding this comment.
🤖 AI generated
❓ question — A disabled row suppresses its hover only through the private --_--background-color-hover: transparent (lines 267–270). :hover (224–227) and _hovered_yes (231–236) read the public --g-list-item-view-background-color-hover first, so when the variable is set, a disabled row under the pointer is highlighted.
This is reachable in Select. SelectList.scss:41–43 gives disabled options pointer-events: auto again, and the Select README and the v8 migration guides recommend setting --g-list-item-view-* on popupClassName. A hovered disabled option stays transparent without the variable and is highlighted with it.
Is that intended? If not, exclude disabled rows from the hover rules: &:not(&_hovered_no, &_disabled):hover and &_hovered_yes:not(&_disabled). Then --_--background-color-hover: transparent at line 269 is no longer needed.
| content: ''; | ||
| } | ||
|
|
||
| // A disabled item has the colour of a disabled row, whatever its theme |
There was a problem hiding this comment.
🤖 AI generated
❓ question — A disabled item is now gray, but its trailing slot is not. In the new render size * snapshots, the Ctrl X hotkey of the disabled "Cut" keeps full contrast next to a gray icon and title. Neither part of the slot follows the disabled colour of the row:
__arrowhas its owncolor: var(--g-color-text-secondary)(line 35), so the submenu chevron of a disabled item stays secondary too;Hotkeysets its own text and background colours.
Is that intended? If not, dim the arrow slot of a disabled item as well, e.g. through &[aria-disabled='true'] &__arrow.
What
The modifiers of
ListItemViewwrote literal values into the private--_--*variables that also carried the public--g-list-item-view-*ones._is-containerset--_--padding-*: 0, so the paddingsMenuItemsets through--g-list-item-view-padding-*were ignored and menu items lost their paddings.The styles now follow the pattern of
Button:--_--*variables hold plain defaults, and modifiers (_size_*,_is-container,_active,_selected,_disabled) change only them;--g-list-item-view-*variables are resolved where a value is used:padding-inline: var(--g-list-item-view-padding-inline, var(--_--padding-inline)).Menu
MenuItemdrops its own padding and sets the public padding variables per size;display: flexis scoped with.g-list-item-viewso it wins over_is-container.theme: the theme text colour no longer applies to an item witharia-disabled.text-align: start).Behaviour changes
isContainerhas no paddings by default, but the padding variables now apply to it (documented in the README).--g-list-item-view-description-colortakes priority over the text colour.:hover/_hovered_yesuse--g-list-item-view-background-color-hover, other states use--g-list-item-view-background-color. A selected row with_hovered_yesnow shows the selection hover colour; with the public variables set, a hovered active row uses the hover variable and a selected active row uses the background variable.Menuitems with theinfo,success,warning,dangerorutilitytheme are gray instead of the theme colour.Tests
New visual tests for
Menu(22 in total, 28 snapshots, light and dark themes): item paddings and heights per size, sizes with icons, hotkeys, a divider and disabled items, all themes (also disabled), selection, alignment of items without an icon or an arrow and of a wrapped title, links, hover on a plain and a selected item, keyboard navigation, the popup and a submenu opened on hover.Testing
npm run lint:styles,npm run typecheck, ESLint on the tests, prettier — clean.--repeat-each=3).legacy/Table"smoke with table settings" was flaky in the local working tree only (anti-aliasing of the Apply button text); on a clean checkout with this change it passed 10/10.🤖 Generated with Claude Code