Join the Webstudio community

Updated yesterday

Automatically modifying all token hovers

Hey everyone! ๐Ÿ‘‹

Is there a way to automatically modify all the hovers of a token at once? I have a set of tokens, and Iโ€™d like to change their hover states without having to edit each one manually. Is there any function, script, or method to do this quickly?

Thanks in advance for the help!
O
J
6 comments
Unfortunately no. I think there might be a problem with how you organized the styles, e.g. if you want to update a color everywhere, should have used a variable.
Is there a way to apply the :hover state of a token and then apply all those into the same token for :focus or other states?
no, I actually don't think, we know how to do this using plain CSS either, usually these things differ quite a bit, so best reuse is variables for values
in plain css I often do this:

.class:hover,
.class:focus {
property: value;
}


This isn't a big deal doing it manually, I just ran into wanting to do this for the first time recently.
I believe originally we wanted to add a checkbox before each state in the menu so one can select multiple once, but we never implemented this
Add a reply
Sign up and join the conversation on Discord