Search

A new extension, “less.php for Symphony” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

less.php for Symphony

This extension is an implementation of less.php for Symphony CMS.

Usage:

Create less-stylesheets by adding the extension .less to them instead of .css:

<link rel="stylesheet" type="text/css" href="{$assets}/css/screen.less" />

The extension will automaticly compile the .less-file and replace the tag with a linke to the cached .css-file.

For more information about the LESS-syntax, look at the readme of less.php.

Please note:

The compiled CSS-files will be placed in the same folder as the LESS-files. Therefore the directory should be writable.

Also, since editing of the CSS is only used when a site is still in it’s production environment, it’s encouraged to disable the extension and used the cached result when the site goes to a live environment.

Is there any reason for implementing this instead of using the node.js implementation of less, which can also run live in the browser under development?

I’ve moved to using purely less.js while developing, and then just compiling the CSS before deployment. less.js even supports live updates in the browser with a “watch” mode during development.

which can also run live in the browser under development?

During development it’s okay, but in a production environment it is an useless overhead:

  • more requests
  • more downloads

And without JavaScript?

During development it’s okay, but in a production environment it is an useless overhead

Of course, but you don’t need live compiling of LESS in a production environment in any case. As I said, I compile the less file to pure CSS for deployment in a production environment, which you should do even if the compiler is PHP, Ruby or in this case JavaScript.

As I said, I compile the less file to pure CSS for deployment in a production environment…

Sorry, I forgot “node.js“. It was just too small! ;-)

I wrote a task with lessphp for phing.

I’ve recently switched from LESS to SASS, mainly because it provided more powerful functions. Nevertheless (pardon the pun) it’s a nice addition for those familiar to it. Definitely helps speed up development and keeps code tidy.

Hi,

Is Less.php using Less v1 or Less v2?

Not sure, you should check the less.php website for that question.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details