How can I add a secondary hover to an element?
For instance, I have an element that is “selectable”. Currently, it has a hover state and a “selected” state that I made bound to the item. On hover, it turns blue; on “selected” it turns purple.
What I’m looking to achieve is: if not selected on hover: turn blue; if selected hover: turn orange.
Hey, new to Weweb here and I’d love to find a “better” answer if there is one, but it might be more of a paradigm shift. Instead of piling classes/states onto things like in css (.class:hover, .another-class:hover…) in Weweb your one hover state can have styles bound to other things. So in your hover state, the color property you want to change can be bound with something like this:
If(selected=true, “orange”, “blue”)
The first part is not looking for your state called “selected”, but should use the same logic that you used to make that state.