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.
Version: 1.22.0
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=55779
https://bugzilla.wikimedia.org/show_bug.cgi?id=61941
https://bugzilla.wikimedia.org/show_bug.cgi?id=67368