[Resolved] Change button color

Home Forums Support [Resolved] Change button color

Home Forums Support Change button color

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1594477
    emanharout

    Hello support team,

    I set button colors via the customizer, inspected a button in my “About” page and it seems to work fine.

    My issue is that when I inspect the element and grab the CSS selector and use it to change the colors manually, it won’t work. I need to be able to select it for some work I’m doing on a dark theme.

    Here is the css:

    
    /* Default button state */
    button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.wp-block-button__link:not(.has-background) {
      color: cyan;
      background-color: red; /* random colors */
    }
    
    /* Hover state */
    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 {
      color: cyan;
      background-color: red; /* random colors */
    }
    
    #1595011
    Leo
    Staff
    Customer Support

    Hi there,

    That selector should work but you didn’t give any styles?
    https://www.screencast.com/t/qLZQxaibzKT

    #1595077
    emanharout

    Right, so I got the selector from the browser dev tools, and if I change the color in the browser it works. But if I copy the selector and use it in “Additional CSS” or styles.css, it has no effect. It’s puzzling.

    #1595117
    emanharout

    Strange, it started to work. Wish I could share the fix for others in the future but I have no idea what did it. I’d previously cleared the cache and tried multiple browsers.

    At any rate, I’ll be closing this ticket. Thank you!

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