Selectors pseudo-classes only working on children

I created very simple scene in ui builder with only a button, and if i apply “.unity-button :hover” selector on it nothing happens to the button itself no matter what properties i change on selector. But if i add for example VisualElement as a child of a button, it is updated on hover. Is this how it should be working?

I am using Unity 2023.2.20

Thank you

You’ll need to remove the space between .unity-button and :hover. The space is a descendant selector:

1 Like

yes i missed that. thank you.