Home>Support>Define colors css

Define colors css


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 a free community support forum. Replies are not guaranteed. If you need professional email support, please purchase a SiteOrigin Premium license.

  1. 2 months, 7 days ago Alex S Hi, I Work Here

    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.

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More