Skip to content

Instantly share code, notes, and snippets.

@MoOx
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MoOx/28808ebe3a9e4bd897ef to your computer and use it in GitHub Desktop.
Save MoOx/28808ebe3a9e4bd897ef to your computer and use it in GitHub Desktop.
postcss-custom-properties test for full support. Is this correct ?
:root,
.light {
--color: black;
}
.dark,
.light--inverted {
--color: white;
}
p {
background: var(--color);
}
a,
.link {
color: var(--color);
}
#important {
--color: red
}
p,
.light p,
p.light {background: black;}
.dark p,
p.dark,
.light--inverted p,
p.light--inverted {background: white;}
#important p,
p#important {background: red;}
a,
.light a,
a.light,
.link,
.light .link,
.link.light {color: black;}
.dark a,
a.dark,
.light--inverted a,
a.light--inverted,
.dark .link,
.link.dark,
.light--inverted .link,
.link.light--inverted {color: white;}
#important a,
a#important,
#important .link,
.link#important {color: red;}
@MoOx
Copy link
Author

MoOx commented Sep 24, 2014

Here I think I got something http://jsbin.com/hunuy/2/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment