[Resolved] What is the correct way to target ALL Generate Press buttons

Home Forums Support [Resolved] What is the correct way to target ALL Generate Press buttons

Home Forums Support What is the correct way to target ALL Generate Press buttons

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1590034
    Mikko

    Hi,

    I’m trying to target all buttons on Generate Press.

    Currently I’m using following selectors for “normal” state.

    button, html input[type=”button”], input[type=”reset”], input[type=”submit”], a.button, a.wp-block-button__link:not(.has-background) {
    }

    ..and these for the other states.

    button:hover, html input[type=”button”]:hover, input[type=”reset”]:hover, input[type=”submit”]:hover, a.button:hover, button:focus, html input[type=”button”]:focus, input[type=”reset”]:focus, input[type=”submit”]:focus, a.button:focus, a.wp-block-button__link:not(.has-background):active, a.wp-block-button__link:not(.has-background):focus, a.wp-block-button__link:not(.has-background):hover {
    }

    I feel that’s awful lot of selectors so my question is what’s the correct and most minimal way to target all buttons of Generate Press?

    I tried “button” and “button:hover” but that doesn’t apply to all buttons.

    Thank you

    #1590040
    Leo
    Staff
    Customer Support

    Hi Mikko,

    The current selector you are using is actually what I would recommend as there is not a single selector that covers all buttons.

    If you aren’t using any buttons block from WordPress then you can remove all the selectors with wp-block-button.

    Let me know if this helps ๐Ÿ™‚

    #1590138
    Mikko

    Yes, I removed wp-block-button from my CSS so it’s little bit leaner now. Thanks!

    #1591364
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.