less / less/less.js

Extend within (reference) imported files.

Open
#1,851 19 comments 0 reactions 1 assignee View on GitHub

@SomMeri is already working on this.

Since Oct 11, 2015.

bug medium priority
Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

Say I have three files:

// fileA.less
.test-a {
  color: red;
}
// fileB.less
@import (reference) "fileA";

.test-b {
  background-color: green;
  &:extend(.test-a all);
}
// fileC.less
@import (reference) "fileB";

.test-c {
  &:extend(.test-b all);
}

What I expect, if I compile fileC.less (comments only to aid the understanding):

// .test-a,
// .test-b,
.test-c {
  color: red;
}

// .test-b,
.test-c {
  background-color: green;
}

What I get:

.test-b,
.test-c {
  color: red;
}
.test-c {
  background-color: green;
}

.test-b leaks in!

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.