Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow detached rulesets as mixin argument defaults #2497

Merged
merged 2 commits into from
Mar 11, 2015

Conversation

calvinjuarez
Copy link
Member

This fixes #2496, allowing detached rulesets to be declared as mixin argument defaults.

For example:

.mixin(@size: 30px; @padding: 30px; @additions: {}) { // the "@additions: {}" used to error
  height: @size;
  width: @size;
  padding: @padding;
  @additions();
}

.no-additions {
  .mixin();
}
.additions {
  .mixin(@additions: {color: white;});
}

compiles to

.no-additions {
  height: 30px;
  width: 30px;
  padding: 30px;
}
.additions {
  height: 30px;
  width: 30px;
  padding: 30px;
  color: white;
}

@lukeapage
Copy link
Member

thanks

lukeapage added a commit that referenced this pull request Mar 11, 2015
Allow detached rulesets as mixin argument defaults
@lukeapage lukeapage merged commit 5387ee5 into less:master Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Allow setting arguments to empty rulesets in mixin definitions
2 participants