Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seven-phases-max/7649229 to your computer and use it in GitHub Desktop.
Save seven-phases-max/7649229 to your computer and use it in GitHub Desktop.
// implementation:
.counter() {
.counter-redefine();
.counter-wrapper((@counter + 1));
}
.counter-wrapper(@new: 0) {
.counter-redefine() {
@counter: @new;
}
} .counter-wrapper();
// usage:
a {
.counter();
counter: @counter;
}
b {
.counter();
counter: @counter;
}
c {
.counter();
counter: @counter;
}
d {
.counter();
counter: @counter;
}
@seven-phases-max
Copy link
Author

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