spectrum-web-components
spectrum-web-components copied to clipboard
[Feat]: ActionMenu/Picker - add identifier to internal sp-menu for css customization
trafficstars
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
ActionMenu, Picker
Description of the requested feature
We have seen quite difficulties to adapt and style underlying sp-menu without any additional id or class of that element. The problem is - if you’d add css styles for an sp-menu of an ActionMenu and the user opens another (not-styled) ActionMenu, those sp-menu css styles will get also applied to the new menu, as there is a short time, when both menus are both opened.
Would it be possible to add an optional parameter (data-menu-id or menuClass) to the newly created internal sp-menu in PickerBase to be used for styling or for e2e tests as css reference?
Styling use cases could include:
- subtitles / subtext in an sp-menu-item
- different colors
- extended alignment of icons for multiline items
Mockups or screenshots
No response
Implementation notes or ideas
No response