Currently upon a hover of a menu item a blue line appears to the left of the menu item.
In addition to this the icon and text should also change blue.
During implementation this proved trickier than one might think with things to consider:
A few notes.
- Currently ResourceLoaderImage module generates icons based on a class name.
What we want here is a hover effect. For example we may have mw-ui-icon-arrow and mw-ui-icon-arrow-invert. To get the hover effect we would need to either patch ResourceLoaderImage module or not use it at all (and then have to generate the pngs ourselves) - this feels wrong.
We can alternatively use JS to change the class on hover. This also feels wrong. Regardless there's going to be more bloat caused to accomodate such a solution
Someone should feel free to attempt a patch for this as maybe someone sees a better way and it's hard to compare a concrete patch with something that doesn't yet exist.
- Shipping additional icons sets a precedent. I was hoping by using this mechanism we could apply it in other places where it makes sense, for example the last modified bar and save additional bytes there. I'm a little worried on the long term we'll be having hover effects for all our icons, is shipping 2 icons the right solution?
- mw-ui-icon-arrow is the name of an icon. mw-ui-icon-arrow-invert is the same icon but a different colour. Wouldn't it be great if we could change the colour just by adding a class e.g. mw-ui-progressive ?