Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Created November 5, 2014 04:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarongustafson/c3ddcb792eb69e0703e1 to your computer and use it in GitHub Desktop.
Save aarongustafson/c3ddcb792eb69e0703e1 to your computer and use it in GitHub Desktop.
CSS Variables are a Bad Idea
:root {
--foreground-color: #333;
--background-color: #fff;
}
body {
background: var(--background-color);
color: var(--foreground-color);
}
:root {
--foreground-color: #333;
--background-color: #fff;
}
body {
background: #fff;
background: var(--background-color);
color: #333;
color: var(--foreground-color);
}
body {
background: #fff;
color: #333;
}
$foreground-color: #333;
$background-color: #fff;
body {
background: $background-color;
color: $foreground-color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment