We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently we can use a king of hack to return a value from a mixin. For instance:
.sum (@a, @b) { @return: (@a + @b); } .size { .sum(5px, 10px); width: @return; .sum(15px, 15px); height: @return; }
But it is ugly.
Suggestion is use the @return variable to literally return a value directly from mixin.
@return
.size { width: .sum(5px, 10px); height: .sum(15px, 15px); }
Both should return:
.size { width: 15px; height: 30px; }
To avoid breaking changes, both examples should work. @return will keep to set the variable on scope, but too will be used as result of mixin.
The text was updated successfully, but these errors were encountered:
See #538 and less-plugin-functions.
Sorry, something went wrong.
Closing as duplicate of #538.
No branches or pull requests
Currently we can use a king of hack to return a value from a mixin. For instance:
But it is ugly.
Suggestion is use the
@return
variable to literally return a value directly from mixin.Both should return:
To avoid breaking changes, both examples should work.
@return
will keep to set the variable on scope, but too will be used as result of mixin.The text was updated successfully, but these errors were encountered: