• MODX.com

    3,499 downloads

lessCSS

lessCSS is an extra by debussy, first released on 2014-09-22.

Package Description

With the leafo/lessPHP project defunct, the Less PHP compiler has been switched to the gpeasy/LessPHP project, version 1.7.0.2. The new engine supports more, if not all, of the newest Less features like extends, mixin guards, etc. More information on the project website. As always, please check any of your existing less files for compatibility.

Also, thanks to MODX forum user Magnatron for the request to update path-fixing functions to ignore data: URLs.

Usage/Installation Instructions

=== USAGE ===

STEP 1:

  • Create a new resource/document in MODX to serve as your main stylesheet.
  • Be sure to assign an blank/empty template to your new resource
  • Be sure to change the page type to CSS

STEP 2:

  • Add the lessCSS snippet to the content of your new page
  • Set &path to the path to your LESS file *relative to base_url*
  • Set &file to the name of your LESS file including the file extension
  • IMPORTANT NOTES:
  •  * It is strongly recommended that you call the snippet cached! (more on that later)
  •  * The path variable will be prepended with MODX's base_url setting
  •  * End your path reference with a trailing slash /

example: [[lessCSS? &path=`assets/templates/myTemplate/` &file=`style.less`]]

STEP 3:

  • Reference your file in your HTML header:

example:

=== CACHING ===

It is best to use the snippet cached, i.e., without the no-cache flag (!). During development, uncheck the cacheable setting in the referencing document. Then, when done with development, turn the page caching back on to prevent lessphp from recompiling on every page load.

=== SAMPLE LESS FILES ===

For some help for those getting started with LESS, a sample LESS setup for a site is included in the assets/components/lesscss/ folder.

=== ADDITIONAL OPTIONS ===

&compress : yes/no : default = 1 : the add-on will strip unecessary white space from CSS output (renders CSS largely unreadable)

&fixRelativePaths : yes/no : default = 1 : the add-on will fix relative URLs in the output to point to the path set in the &path option. This allows you to use paths in your LESS file relative to the LESS file's path (CSS-like behavior) without regard to the path of the MODX output. Will not affect any paths that start with 'http://', 'https://', or '/'.

Details

Developer(s)
debussy
Released
2014-09-22
First seen
2014-09-22
License
GPLv2
Supported databases
MySQL SQL Server
Minimum MODX Requirement
2

lessCSS Releases

Vendor Signature Released on
MODX.com 1.3-pl 2014-09-22 (4 years ago)

We've also seen 2 unverified versions of lessCSS in use, but don't list those as we've been unable of confirming they are official releases from an official source.