less / less/less.js

feature: group import statements

Open
#1,334 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I mentioned this in another issue but never made it a request of its own. The request is to group import statements together:

@import (reference) {
    "one.less",
    "two.less",
    "three.less",
    "four.less"
}

I suppose we would have to adjust syntax for media queries, maybe something like:

@import (rule) (min-width:400px) {
    "one.less",
    "two.less",
    "three.less",
    "four.less"
}

Another option would be to just group the files together like this:

@import (rules) "one.less, two.less, three.less" (min-width:400px);

But this doesn't seem like a good syntax for a bunch of files like you might have with a lib like Bootstrap.

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 by reviewing issue #1334 and its discussion of grouped @import syntax, including the proposed handling for media queries. No files, tests, or entry points are named; done would require an agreed syntax and corresponding compiler behavior and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.