Hello, I have a DropdownField and when I hover over it, the background colour turns to the default light grey colour. I’ve been trying to change the colour of this by overwriting whatever selector controls this colour.
The UI debugger tells me that the VisualElement attached to the DropdownField is where the colour is being changed.
This VisualElement shows 3 selectors: .unity-base-field__input, .unity-base-popup-field__input and unity-popup-field__input
.unity-base-popup-field__input is the one that has the initial unhovered background colour, so I successfully overwrote that to change the colour. But this still leaves the colour changing on hover.
I assumed that .unity-base-popup-field__input:hover would be what I needed to overwrite next but the colour still changes to light grey. So I tried overwriting the other selectors:hover to no success. I even tried the same with all the selectors shown on the DropdownField.
I can select the VisualElement in the debugger and watch the background colour switch to light grey as I hover over it. It tells me its from “unity stylesheet”. I’ve overwritten all matching selectors shown. I have no clue what I need to overwrite to get the drop down field to not turn light grey when hovering over it.
I’ve searched for similar questions and I’ve made sure to add my stylesheets to the theme style sheet, although that only really helped with the drop down list you get when you click it.
I was also able to successfully overwrite the unity-button hover thanks to the help here: .unity-button:hover backgorund color is ignored in theme style sheets but just like the user described there I don’t see any update of the matching pseudo selectors when hovering over things. I tried this in both 6000.0.2f1 and 2022.3.44f1