<?php
namespace Engine\Theme\CSSLoader;

/**
 * Use the less.php parser to comporess CSS files
 * @author Lucian Sirbu
 */
class LessPHP extends Complex
{

	/**
	 *
	 * {@inheritDoc}
	 * @see \Engine\Theme\CSSLoader\Complex::reformatContent()
	 */
	protected function reformatContent($CSSContent)
	{
		$less = new \Less_Parser();
		$less->SetOptions([
			// 'compress' => true,
			'math' => 'always'
		]);

		$less->parse($CSSContent);
		return $less->getCss();
	}
}
