Skip to content

Instantly share code, notes, and snippets.

@NetzwergX
Last active December 26, 2015 15:29
Show Gist options
  • Save NetzwergX/7173052 to your computer and use it in GitHub Desktop.
Save NetzwergX/7173052 to your computer and use it in GitHub Desktop.
LESS :extend Bug
.var {
text-align: right;
}
.foo {
content: "a";
}
.foo:before {
color: green;
}
.foo:before {
color: green;
}
/* here comes the bug free version */
.var,
.foo:before,
.foo:before {
text-align: right;
}
.foo {
content: "a";
}
.foo:before {
color: green;
}
.foo:before {
color: green;
}
/* F*ck up LESS*/
@var: var;
.@{var} {
text-align: right;
}
.mixin (@arg) {
content: "@{arg}";
&:before {
color: green;
&:extend(.@{var});
}
}
.foo {
.mixin('a');
}
/* here comes the bug free version*/
@var: var;
.var {
text-align: right;
}
.mixin (@arg) {
content: "@{arg}";
&:before {
color: green;
&:extend(.var);
}
}
.foo {
.mixin('a');
}
@NetzwergX
Copy link
Author

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