less / less/less-docs

Document special case - mixins return values

Open
#80 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Less
Stars
680
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Mixins returned within one call do not see each others return values. This:

@returned: global;

.mixin() {@returned: returned1;}
.mixin() {returned: @returned;}
.mixin() {@returned: returned2;}

div-1 {
  .mixin();
}

compiles into:

div-1 {
  returned: global;
}

I briefly considered to file it as an "issue", but we do not have to over-complicate things. It is good as it is.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with issue #80 and its mixin examples, then locate the relevant Less documentation section for return values. Document the special case that mixins invoked in one call do not see one another's return values, using the provided input and compiled output as the example.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.