exponentcms / exponent-cms

Content Management, Simple.
exponentcms.org
GNU General Public License v2.0
59 stars 24 forks source link

Feature request - Implement LESS stylesheet compiler #1514

Closed exponentcms closed 4 years ago

exponentcms commented 4 years ago

In recent discussions on irc, it was noted that we might want to begin to implement the LESS css compiler package which ehances stylesheet creation by allowing variables and treats stylesheets like Smarty uses templates for html. LESS is used by Twitter Bootstrap and Font Awesome, but would also be useful even if used standalone. http://lesscss.org and there is a php implementation http://leafo.net/lessphp

exponentcms commented 4 years ago

We'd likely want to implement this:

exponentcms commented 4 years ago

[bulk edit]

exponentcms commented 4 years ago

Upon further pondering...we probably want to:

exponentcms commented 4 years ago

Initial implementation working locally:

exponentcms commented 4 years ago

Would be nice to develop a method for integrating variables/config settings into the .less compile process. Have already modified less.inc.php to allow passing a variable array to lessc::cexecute(), but need to determine how best to pick it up.

exponentcms commented 4 years ago

(from [785a57b78aba1ed24f8ec7a83afa4e9b48cc905c]) Initial implementation of the LESS stylesheet compiler[#658] https://github.com/exponentcms/exponent-cms/commit/785a57b78aba1ed24f8ec7a83afa4e9b48cc905c

exponentcms commented 4 years ago

This is implemented currently in the following mannger in expTheme::head(), expCSS:pushToHead & {css} smarty function:

The .less file will be (re)compiled if:

exponentcms commented 4 years ago

as a note, twitter-bootstrap 2.1.1 will NOT compile w/ lessphp, you must use 2.1.2wip

exponentcms commented 4 years ago

We'll call this one complete as the implementation seems to work...will reopen if during the jquery integration we come up with a better implementation strategy

exponentcms commented 4 years ago

Lighthouse URL: https://exponentcms.lighthouseapp.com/projects/61783/tickets/658