Define colors css
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
1Hi 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.