Hi,
Sorry this may be a silly question and more web development related, but how can I set the class to also apply to a state?
So I have a button and I have styled it and used my own button class my-button
. I style the background, padding, etc.
Now I also set a hover state and a focus state. I style them too. A slightly darker background and other style edits.
When I apply my class my-button
to another button element, I see the default state exactly how I styled the class and how I expected it to look. However, this new button element doesn’t have the hover state or the focused state.
Do I have to create separate classes for the button hover and focus state and then apply these to each new button element (in its corresponding state)?
I’m probably thinking about this the wrong way so any help is much appreciated.
Thank you.