This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Define colors css

9 years ago · Last reply by Alex S 9 years ago

Hi,

I use SiteOrigin CSS by SiteOrigin and I tried to do this but the declaration of a color doesn’t work :(

:root {
–primary-color: #285157;
–secondary-color: #4c4c4c;
–accent-color: #df1616;
–divider-color: #840a1b;
}

.h1 {
color: var(–primary-color);
}

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Alex S Staff 9 years, 1 month ago

    Hi FuoriLuogo,

    Okay, so there are a few issues with your CSS. Firstly, there needs to be two hyphens (–) rather than a single – (that might be related to our formatting though).

    Also, is the .h1 intentional?

    The following CSS should work without issue for you:

    :root {
    --primary-color: #ff0;
    }
    
    #masthead .hgroup h1 {
    color: var(--primary-color) !important;
    }
    

    I’ll show up as an error due to a CSSLinit issue (it’s the ruleset) but you can safely ignore it.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread