-
-
Notifications
You must be signed in to change notification settings - Fork 276
Description
If a dropdown menu is made without the caret, only the left side of the toggler is rounded on hover (the darker background, here).
This appears to be due to the first selector in the rule:
.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn.dropdown-toggle-split:first-child,
.btn-group > .btn-group:not(:last-child) > .btn {
border-start-end-radius: 0;
border-end-end-radius: 0;
}The problem is that in the standard order of coding dropdown menus:
<CDropdown ...>
<CDropdownToggle caret={false} ...>...</CDropdownToggle>
<CDropdownMenu>...</CDropdownMenu>
</CDropdown>CDropdown, the parent, is a btn-group and it has two children and the toggler is the first one, but because caret={false}, the toggler is not assigned the class dropdown-toggle, so the selector is satisfied:
<div class="btn-group help-menu">
<button class="btn btn-primary>...</button>
<ul class="dropdown-menu">...</ul>
</div>So it seems that there are two potential solutions:
- A simple fix may be to change
.btn:not(:last-child)to.btn:not(:last-of-type)in coreui/scss, possibly in two places in that file. - Alternatively, always assign togglers to the class dropdown-toggle?
I'm not sure of the consequences of each options, so am not posting this as a PR.
Also, as best as I can tell this is a recent problem, as it used to work correctly. [Edit: see next comment.]
Windows 11, Chrome, but this should be irrelevant.