Incorrect/inconsistent styling of cellview and/or menuitem:nth-child(N)
@dboles
Submitted by Daniel Boles Link to original bug (#784485)
Description
I was trying to style MenuItems in a Combobox's Menu based on their position, using this CSS selector:
menuitem:nth-child(N) > cellview
{
background: @blah;
color: @bluh;
}
This seems only to work correctly for one or two cells, often the 1st and last - but the rest suffer strange effects like:
- getting semi-random combinations of the different fg/bg colours
- changing colour when hovered, e.g. only showing the desired bgcolour then, or showing the right bgcolour until hovered then showing the parent's bgcolour
- sometimes changing colour on hover in a way that persists between close/open.
It turns out this applies to any selector on the child of a menuitem, which itself is the nth-child of its parent. Somehow selecting on only menuitem works as expected, though this probably limits theming somewhat. However, as soon as a child selector like > cellview or just > * is added, things fall apart rapidly as described above.
Version: 3.22.x