Skip to content

Instantly share code, notes, and snippets.

@just-boris
Last active August 29, 2015 14:14
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 just-boris/a86f3646f48683a9bf17 to your computer and use it in GitHub Desktop.
Save just-boris/a86f3646f48683a9bf17 to your computer and use it in GitHub Desktop.
Less var mess
@block: widget-a;
.@{block} {
color: red;
}
@block: widget-b;
.@{block} {
color: blue;
}
@import "a";
@import "b";
@just-boris
Copy link
Author

I am wondering how widget-a becomes a widget-b when compiling:

.widget-b {
  color: red;
}
.widget-b {
  color: blue;
}

@mistakster
Copy link

Yep. It’s so unpredictable.

In our company, we do not import blocks — we pre-process each block independently. It works fine if you follow the rule “one file — one block”.

Thanks for flagging this problem.

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