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

            Bug ID: 67368
           Summary: ResourceLoader: Remove custom LESS functions
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: ResourceLoader
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
       Web browser: ---
   Mobile Platform: ---

I think it was a design flaw that we went ahead with implementing php-land
functions at all. It was a questionable experiment, but we know better now and
I think we should admit that and phase it out ASAP.

This brings three main problems:

1) Decreased compatibility; (can't easily compile it with lessjs without
porting the functions over and keeping in sync).
2) Extra maintenance; (when we switch lessphp implementations or upgrade, these
will need updating).
3) Separation of concerns and flow control; (embedding is supposed to be part
of CSSMin and run *after* CSSJanus; doing it in LESS before it even turns to
CSS disrupts this).


Problem #3 causes bugs like bug 66091, where in Less files certain things don't
get flipped properly by CSSJanus because it jumps the gun on mapping things to
files on disk and reading them.

I think we should deprecate the less embed() function and instead ensure the /*
@embed */. This provides many benefits:

* Reduced duplication.
* Less output is easier to debug with (no embedded data uris[1]).
* No maintenance overhead (and bugs like bug 66091) by having to keep its
behaviour in sync with non-LESS files with regards to CSSJanus flipping.
* Keeps minification restricted to CSSMin (which runs anyway, the only way it
makes sense to start minifying or reading files from disk earlier is if we
somehow phase out CSSMin entirely, which would be an interesting adventure of
its own)

-- 
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to