Include hover in class?

How do I include the :hover styling parameters in a class, so that I don’t have to re-implement the styling on each element?

Tried to create a new class from an element that already had :hover but it didn’t get included apparently.

My current, temporary solution was to add a “class” field value to the build-in Weweb class feature, and then add custom CSS (.myClass:hover {}).

For now, you need another class to manage the hover state, however we’re in the process of making some changes under the hood that will allow us to implement those pseudoselectors

2 Likes

Give a class to those html elements on which you want hover effect. now target that class name in css and apply hover effect on those class. by this when you hover over any element then the hover styles will be applied to those and you have don’t repeat the styles for each element.

1 Like