Page MenuHomePhabricator

LESS in ResourceLoader can't parse two ampersands on one line
Open, LowPublic

Description

.foo {
  &:not( &-bar ) {
    ...
  }
}

should parse to

.foo:not( .foo-bar ) { ...

but in resource loader it parses to

.foo:not( &-bar ) { ...

Event Timeline

Restricted Application added a project: Performance-Team. · View Herald TranscriptSep 19 2018, 11:16 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 461369 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Avoid ResourceLoader LESS parsing bug

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

The above patch works around the issue, it is not a fix.

less.php hasn't been touched in two years and has 88 open issues: https://github.com/oyejorge/less.php :/

Change 461369 merged by jenkins-bot:
[mediawiki/core@master] Avoid ResourceLoader LESS parsing bug

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

Alexia added a subscriber: Alexia.Nov 30 2018, 9:17 PM

less.php hasn't been touched in two years and has 88 open issues: https://github.com/oyejorge/less.php :/

It is not compatible with PHP 7.1+ either. There are many broken issues with the Less.php implementation.

Krinkle moved this task from Inbox to Accepted: Bugs on the MediaWiki-ResourceLoader board.
Krinkle triaged this task as Low priority.