Page MenuHomePhabricator

AceEditor doesn't understand media queries
Closed, ResolvedPublic

Description

Discovered when playing with TemplateStyles...

https://www.mediawiki.org/w/index.php?title=Template:Wikimedia_engineering_project_information/core/styles.css&action=edit shows Error: Expected IDENT at line 1, col 17. but this is perfectly valid CSS.

Event Timeline

Ace hasn't been updated in our repo's for a while, and thus the syntax libraries haven't either. Newer versions likely have this fixed.

Ace 1.2.8 does support media queries.
Although AFAIK the plan is to move away from Ace anyway (T50826).

It confused me when using TemplateStyles so I'm sure it would confuse others and I really want to encourage media queries!!

Several options:

  • Not to use Ace on that wiki
  • Not use Ace on css files
  • Upgrade Ace

What's better?

It's not actually a version issue, we use 1.2.3 and media query support was added way back before 1.0.0. And the bug can be reproduced in the current editor.

Change 304044 had a related patch set uploaded (by TheDJ; owner: Paladox):
[mediawiki/extensions/CodeEditor@master] Update ace to 06.08.2017

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

Change 304044 merged by jenkins-bot:
[mediawiki/extensions/CodeEditor@master] Update ace to 06.08.2017

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