less / less/less.js

Documentation error. Please fix it.

Open
#4,326 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

On this page: https://lesscss.org/features/#extend-feature-extend-all

This example does not work:

.bucket { color: blue; }
@{variable}:extend(.bucket) {}
@variable: .selector;

compiles to:

.bucket, .selector { color: blue; }

You need to write it like this:

.bucket { color: blue; }
@{variable} { &:extend(.bucket); }
@variable: .selector;

compiles to:

.bucket, .selector { color: blue; }

As I understand it, LESS treats interpolation as "late binding", so :extend() cannot be applied to a selector that has not yet been formed at the parsing stage.

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

Open the linked Extend all documentation page and locate the example around the reported anchor. Compare the shown interpolation and :extend() forms, then update the documentation example and verify that the rendered page and documented compilation output are correct.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.