fix: styles of context menu item content#3201
fix: styles of context menu item content#3201krava11i wants to merge 1 commit intocarbon-design-system:masterfrom
Conversation
✅ Deploy Preview for carbon-components-angular ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
DCO Assistant Lite bot All contributors have signed the DCO. |
|
I have read the DCO document and I hereby sign the DCO. |
1747677 to
befcbef
Compare
|
recheck |
|
Oh, I saw this doesn't fix the problem and there allready is todo written in the code for this. I try to find another valid solution. |
when no icons or only select icons are used the item name was diplayed with 1rem icon width
befcbef to
f36757a
Compare
|
I fixed the css selector to decide whether the icon class should be set or not. While doing this fix I stumbled upon a todo which said the class setting should listen for the onpush change detection. I implemented a solution for that but reverted it afterwards. From a usability point of view the spacing in the context-menu-item should be set on init so the content doesn't jump when selected or deselected. So I think this fix does the job. Now on init when an icon or type checkbox / radio is set all items are getting displayed with the icon space on the left and otherwise without it. |
Previously when no icons or only select icons are used the item name was diplayed with the 1rem icon width. This fix enables the correct use of context-menu-items with and without icons.
Changelog
New
Changed
Removed