less.ruby icon indicating copy to clipboard operation
less.ruby copied to clipboard

Variable to variable assignment scope broken in mixins

Open jscheel opened this issue 13 years ago • 0 comments

codepen.io example for testing: http://codepen.io/anon/pen/opiJc

@other-color: #ff0000;

.a {
  @color: #00ff00;
}

.b {
  @color: #0000ff;
}

.c {
  @color: @other-color;
}

// Change this mixin to each of the mixins above. .a() works, .b() works, .c() throws an error

.a();

body {
  background-color: @color;
}

jscheel avatar Sep 28 '12 16:09 jscheel