Keith Devon @keithdevon.com · Nov 18

Have any #WordPress people figured out how to add hover colours to button blocks with custom background colours? Seems to me that the .has-[colour-slug]-background-color rule will always take precedence. I could write custom rules for each colour in the palette but that isn't great. Any thoughts?

4 likes 3 replies

?

Replies

Viktor Bijlenga · Nov 18

@rich.blog Do you know how to do this? Would love to know the answer to this as well.

herrhellmute · Nov 18

Hei Keith, part of my theme.json: styles > blocks > core/group > elements > button hope this helps!

Rhys Wynne · Nov 18

I use Sass to do something like this (and yes it's ugly as sin and uses !important tags but I'd rather a happy a client than the CSS Mafia letting down my tires)