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

       Web browser: ---
            Bug ID: 54673
           Summary: LESS compiler should preserve the position of CSSMin /
                    CSSJanus annotations
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

We have some fancy ideas for handling image embedding and flipping in LESS, but
until they are realized, LESS should preserve CSS @embed and @noflip
annotations.

The problematic bits in lessc.inc.php that need to be modified are in lines
280-286:

    protected function compileProps($block, $out) {
        foreach ($this->sortProps($block->props) as $prop) {
            $this->compileProp($prop, $block, $out);
        }

        $out->lines = array_values(array_unique($out->lines));
    }


Required changes:
* Call to array_unique() should be replaced with something that exempts
comments, because it is valid to have multiple /* @embed */ annotations in a
single block. (Maybe we can just get rid of 'array_unique' -- it could be a
nonstandard performance optimization.)
* sortProps should preserve the position of @annotations relative to the rules
below them.

-- 
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