Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created December 17, 2013 21:41
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 chriseppstein/8013073 to your computer and use it in GitHub Desktop.
Save chriseppstein/8013073 to your computer and use it in GitHub Desktop.
css is not order dependent.
:root {
var-grid-width: 20px;
}
div[class*="span-"] {
float: left;
}
div.span-5 {
/* This should be 50px because the var-grid-width below should override the value above. */
width: calc(var(grid-width) * 5);
}
:root {
var-grid-width: 10px;
}
div[class*="span-"] {
float: left;
}
div.span-5 {
/* This should be 50px because the var-grid-width below should override the value above. */
width: 100px;
}
@MoOx
Copy link

MoOx commented Jun 20, 2014

fyi, this is has been fixed (but I think you already know that).

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