Site logo

[Resolved] theme overriding gravity forms colours

Home Forums Support [Resolved] theme overriding gravity forms colours

Home Forums Support theme overriding gravity forms colours

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2594207
    orlaith

    Hi there, I have colours set via the customizer for gravity forms contact form. Text is set to black & background is set to white. Everything works well but after text has been input it goes white and cannot be seen. I added the CSS below but don’t see any changes. Is this being overwritten somewhere that I cannot see?

    /*Gravity Forms input colour*/
    body #gform_wrapper_1 .gform_body .gform_fields .gfield input {color: black;}

    Thanks

    #2594397
    David
    Staff
    Customer Support

    Hi there,

    Gravity forms is using a bunch of CSS custom properties ( variables to load colors ).
    This one in particular is setting that text color:

    color: var(--gform-theme-local-color);

    good thing about variables as they can be locally scoped. So you can change them on a specific element for better specificity. Try this:

    .gform-theme--framework {
        --gform-theme-local-color: #000000;
    }
    #2594435
    orlaith

    Hi David, thanks a bunch. I’ve added that but it doesn’t seem to be doing anything.

    #2594441
    David
    Staff
    Customer Support

    Can you disable the SG optimizer so i can see whats going on with the CSS ?

    #2594666
    orlaith

    Sure David I have disabled the SG optimiser 🙂 Thanks

    #2595100
    Ying
    Staff
    Customer Support

    Can you try adding this CSS instead?

    .gform_wrapper {
        --gform-theme-color-inside-control-contrast: #000000 !important;
    }

    Just checked your CSS file, the CSS above David’s CSS is missing a } at the end, make sure you add it.

    #2595883
    orlaith

    Thank you Ying & David, that worked perfectly 🙂

    #2596799
    Ying
    Staff
    Customer Support

    You are welcome 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.