You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Whenever a dropdown has append-to-body set to true, there's no way to add 'local' styles to the dropdown menu using CSS, since you can't filter the parent class, and just using .dropdown-menu would result in changes in all dropdown instances.
Describe the solution you'd like
Easier solution would be to add a menu-class/dropdown-menu-class prop to the dropdown component.
Describe alternatives you've considered
If the dropdown slot allowed other elements besides templates, the issue would also be solved, but I think that would result in a lot of CSS being rewritten to allow that.
Also, I know I can always just do the styling by JS, but I think CSS is always preferred.
I use other dropdown components with append-to-body, so doing that would also end up overriding the styles of other dropdowns. If you're ok with the dropdown-menu-class idea I can try implementing it on the weekend.
This is still an issue - a class property would be great since append-to-body only adds an <ul class="dropdown-menu"> to the body which you cannot specify - you can style if it's the only dropdown, but if you have multiple it will clash.
Is your feature request related to a problem? Please describe.
Whenever a dropdown has
append-to-body
set to true, there's no way to add 'local' styles to the dropdown menu using CSS, since you can't filter the parent class, and just using.dropdown-menu
would result in changes in all dropdown instances.Describe the solution you'd like
Easier solution would be to add a
menu-class
/dropdown-menu-class
prop to the dropdown component.Describe alternatives you've considered
If the
dropdown
slot allowed other elements besidestemplate
s, the issue would also be solved, but I think that would result in a lot of CSS being rewritten to allow that.Also, I know I can always just do the styling by JS, but I think CSS is always preferred.
Additional context
Quick example:
The text was updated successfully, but these errors were encountered: