Skip to content

Instantly share code, notes, and snippets.

@awayken
Created November 6, 2012 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save awayken/4026667 to your computer and use it in GitHub Desktop.
Save awayken/4026667 to your computer and use it in GitHub Desktop.
Mixin and Variable Cascading in LESS
@value: #000;
.mixin {
color: @value;
}
@value: #333;
.parametric() {
color: @value;
background: @value;
}
.mixin {
color: #999999;
}
.mixin {
color: #999999;
background: white;
}
.combinedmixin {
color: #999999;
background: white;
}
.combinedparametric {
background: #999999;
color: #999999;
background: black;
}
@import "included_file.less";
@value: #666;
.mixin {
color: @value;
background: white;
}
@value: #999;
.parametric() {
color: @value;
background: black;
}
.combinedmixin {
.mixin;
}
.combinedparametric {
.parametric;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment