https://bugzilla.wikimedia.org/show_bug.cgi?id=62300

            Bug ID: 62300
           Summary: MediaWiki LESS files are incompatible with lessc
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Skin and page rendering
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: sp...@wikimedia.org
                CC: jrob...@wikimedia.org, krinklem...@gmail.com,
                    matma....@gmail.com, pgi...@wikimedia.org
       Web browser: ---
   Mobile Platform: ---

I tried to compile vector.less using lessc 1.4.2 (LESS Compiler) [JavaScript]:

$ lessc --include-path=/home/spage/projects/core/resources/mediawiki.less/
resources/mediawiki.ui/vector.less

fails with

FileError: 'mediawiki.mixins' wasn't found in
.../resources/mediawiki.ui/components/default/buttons.less on line 1, column 1:
1 @import "mediawiki.mixins";

It seems lessc requires you include the extension when importing files from the
include path.  If I change the line in buttons.less to
  @import "mediawiki.mixins.less"

then lessc fails with
ParseError: Unrecognised input in
.../resources/mediawiki.less/mediawiki.mixins.less on line 15, column 18:

15     background-image: url(@url)!ie;

lessc doesn't like the !ie.  We actually use this in e.g.
mediawiki.action.view.postEdit.  Maybe it needs to be quoted or escaped in some
way.

Our PHP compiler in includes/lib/lessc.inc.php is obviously different code than
the nodejs implementation, but we should avoid gratuitous incompatibilities.

An alternative to using lessc is to use ResourceLoader to generate the CSS,
e.g.
http://en.wikipedia.org/w/load.php?debug=true&lang=en&modules=mediawiki.ui&only=styles&skin=vector&*
, and save the resulting file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to