Preview:
/* Default values */
:root {
    --text-color: #222;
}
/* Values in alt-color */
.alt-color {
    --text-color: green;
}
/* Vercschachtelung muss beibehalten werden, damit IE Fallback greift */
.alt-color p {
    color: green; /* fuer IE */
    color: var(--text-color);
}

/* 
ohne IE Support waere das für einen Farbwechsel ausreichend:

p {
    color: var(--text-color);
}
*/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter