less / less/less.js

support pseudo-class function which contains less `Variable` or other edge case

Open
#3,622 6 comments 0 reactions 1 assignee View on GitHub

@iChenLei is already working on this.

Since Jun 18, 2021.

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

Description

Here are 2 examples of valid code using the :is pseudo-class that are not handled by LESS correctly. Can you please allow valid code like this to work with LESS?

Tested on: https://lesscss.org/less-preview/
which erroneously issues the error message: Missing closing ')' for both examples.

@-moz-document domain("example.com") {
	:is([foo], [bar] /* :is(a, b) */, [baz]) {
		color: red; }
}
@-moz-document domain("example.com") {
		:is(
			[a1],
			[a2]
		):is(
			[a3],
			[a4]:not(
				:is([a5],[a6])
			):is(
				[a7]:not(:is([a8],[a9])),
				[b1]:not(:is([b2],[b3]))
			):is(
				[b4],[b5]
			),
			[b6],
			[b7]
		) {
			color: red; }
	
}

See also: https://github.com/openstyles/stylus/issues/1253

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.