Skip to content

Instantly share code, notes, and snippets.

@seven-phases-max
Last active August 29, 2015 14:26
Show Gist options
  • Save seven-phases-max/65235eaf56a90271de64 to your computer and use it in GitHub Desktop.
Save seven-phases-max/65235eaf56a90271de64 to your computer and use it in GitHub Desktop.
// see also http://codepen.io/seven-phases-max/pen/GJeKBz?editors=110
@alt-color: extract(
lighten(@color, 25%) darken(@color, 25%),
round(1 + lightness(@color) / 100));
a {
@color: red;
color: @alt-color;
}
b {
@color: blue;
color: @alt-color;
}
c {
@color: darkgreen;
color: @alt-color;
}
d {
@color: black;
color: @alt-color;
}
e {
@color: white;
color: @alt-color;
}
// etc.
// unused variable, it's required for lazy-evaluation in rulesets above
// don't bother about it, it is used only to make the example shorter
@color: #123;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment