Skip to content

fix:(issue#4397): container query variable names#4398

Open
puckowski wants to merge 1 commit intoless:masterfrom
puckowski:master_fix_issue4397
Open

fix:(issue#4397): container query variable names#4398
puckowski wants to merge 1 commit intoless:masterfrom
puckowski:master_fix_issue4397

Conversation

@puckowski
Copy link
Contributor

What:

@varfoo: foo;
@threshold: 400px;
@container @varfoo (min-width: @threshold) {
    #sticky-child {
      font-size: 75%;
    }
}

Why:

Current behavior results in:

/* trailing space after the variable gets removed
    => 'foo' handled as a function
    => fail */
@container foo(min-width: 1024px){
    /* ... */
}

which is incorrect.

With the fix the output becomes:

/* space chars preserved */
@container foo (min-width: 1024px){
    /* ... */
}

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

* Fix for issue less#4397 container query with variable names like
  @container @foo () {}.
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant