less / less/less.js

Lazy load variables from called mixins

Open
#2,543 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug low priority up-for-grabs
Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

Following code will throw a variable @a is undefined error, which is strange due to the nature of lazy-loaded variables

.m1() { @b: @a; }
.m2() { @a: #aaa; }
.m1();
.m2();

yet everything is fine when the variables are accessed consequently

.m2() { @a: #aaa; }
.m1() { @b: @a; }
.m1();
.m2();

Please clarify

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

The issue names no source file, test, or entry point. Start by reproducing both mixin snippets and tracing how lazy variable lookup handles called mixins; done means the project has a documented, tested explanation of whether the differing results are intended or a bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.