difference between a imported namespace and a declared one
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
this code work well:
#ns {
.nsmixin(@color){
color: @color;
}
}
.mixin()
{
.test2 {
#ns > .nsmixin(blue);
}
}
.mixin();
Then i create a file ns.less which contains:
.nsmixin(@color){
color: @color;
}
now the code below shows an error:
#ns { @import "ns.less";}
.mixin()
{
.test2 {
#ns > .nsmixin(blue);
}
}
.mixin()
error: "SyntaxError: #ns > .nsmixin is undefined" this only happens when its wrapped inside a mixin. Use the namespace in a class works well too:
#ns { @import "ns.less";}
.test2 {
#ns > .nsmixin(blue);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two namespace examples and compare declared versus imported namespaces, especially when the namespace is referenced inside a mixin. The payload names no source files or tests, so first locate the namespace and import-resolution code and any existing regression tests. Done means the behavior is fixed consistently or the supported difference is clearly documented.
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
- Mostly clear
- Newbie friendliness
- 30/100