-
Notifications
You must be signed in to change notification settings - Fork 4
feat(menu): Avatar 领头的菜单行纳入前导图标列约定 #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2571,7 +2571,7 @@ | |
| The menu owns icon size and spacing; grid alignment centers the glyph. | ||
| SelectItemText is transparent to this grid only when it has a leading icon. */ | ||
| @layer utilities { | ||
| .menu-item:has(> :is(svg, img):first-child), | ||
| .menu-item:has(> :is(svg, img, [data-slot="avatar"]):first-child), | ||
| .menu-item:has(> [data-slot="select-item-text"] > :is(svg, img):first-child) { | ||
| display: grid; | ||
| grid-template-columns: var(--menu-item-leading-size) minmax(0, 1fr); | ||
|
|
@@ -2582,7 +2582,7 @@ | |
| padding-inline-start: 0; | ||
| column-gap: 0; | ||
| } | ||
| .menu-item > :is(svg, img):first-child, | ||
| .menu-item > :is(svg, img, [data-slot="avatar"]):first-child, | ||
| .menu-item > [data-slot="select-item-text"] > :is(svg, img):first-child { | ||
| /* Menu geometry overrides legacy size/margin utilities at call sites. */ | ||
| width: var(--menu-leading-icon-size) !important; | ||
|
Comment on lines
+2585
to
2588
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This globally changes a menu-leading Avatar from its normally overridable 32px size to the 16px menu-icon token via AGENTS.md reference: AGENTS.md:L856-L861 Useful? React with 👍 / 👎. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an Avatar is supplied to
<SelectItem>,SelectItem.vuewraps the slot inside[data-slot="select-item-text"], so the changed direct-child branch cannot match and the nested branches still accept onlysvg/img. Those Avatar-leading Select rows therefore retain the old flex padding and 32px Avatar instead of receiving the new grid column and 16px sizing; add Avatar to the three nestedSelectItemTextselector lists as well.Useful? React with 👍 / 👎.