Page MenuHomePhabricator

[css-guards] Fix parsing of "when" conditions after selectors with a pseudo classes (e.g. "a:hover")
Closed, ResolvedPublic

Description

... parse /test/Fixtures/lessjs-2.5.3/less/css-guards.less Fail
--- actual
+++ /test/Fixtures/lessjs-2.5.3/css/css-guards.css
@@ -1,4 +1,37 @@
-Expected ')' got '=' in css-guards.less on line 103, column 1
-101|   .mixin-doesnt-exist();
-102| }
-103| a:hover when (2 = true) {5:-}

Event Timeline

Krinkle triaged this task as Medium priority.Jan 5 2024, 9:53 PM

When working on parserInput I found that support for this feature was first introduced here: https://github.com/less/less.js/commit/49955d3a354615b98543ca34e2f884e41f59ca29

Change #1021933 had a related patch set uploaded (by Pmiazga; author: Pmiazga):

[mediawiki/libs/less.php@master] Fix parse error effecting pseudo classes with guards

https://gerrit.wikimedia.org/r/1021933

pmiazga changed the task status from Open to In Progress.Fri, Apr 19, 1:37 PM
pmiazga claimed this task.
pmiazga moved this task from Within 2 Qs to Current Sprint on the MediaWiki-Platform-Team board.

Change #1021933 merged by jenkins-bot:

[mediawiki/libs/less.php@master] Fix parse error effecting pseudo classes with "when" guards

https://gerrit.wikimedia.org/r/1021933