register asset less

Permalink
Can you register an asset of type .less ? And if not, how do you manage a site made up of just less instead of css ? Do you need to hook a compiler of some sort and then register the css that is created ?

Thanks,

Warren Bell

warish
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi warish,

Less files are currently not available as assets.

There is a GitHub issue that proposes adding this feature.

"Create LESS asset type #1490"
https://github.com/concrete5/concrete5/issues/1490...

To register assets, I believe you would compile them first.
mnakalay replied on at Permalink Reply
mnakalay
Hello,
What do you mean by "a site made up of just LESS"? Do you mean the theme styling? OR do you mean also blocks?

If you are looking into using LESS for your theme, you should check the docs:http://www.concrete5.org/documentation/developers/5.7/designing-for...

Make sure to read all the sub-sections listed on the left.

If you want to use LESS with anything possible including blocks, than @MrDilKington is correct, it's not really possible right now
jakobfuchs replied on at Permalink Reply
jakobfuchs
Since Concrete5 comes with a LESS parser it should be possible to write your own implementation of this functionality.

Here's a blog post that describes a custom implementation:

http://www.codeblog.ch/2014/01/concrete5-use-less-files-for-block-t...

I haven't tried this and since it's over a year old I don't know if it's still working as outlined there (was written for version 5.6, I believe).
MrKDilkington replied on at Permalink Reply
MrKDilkington
@jakobfuchs

That is a very interesting link.

Having the ability to set the value of Less variables from a controller would be very useful. It would make add-on CSS far more organized and maintainable.

This is the Less parser used in 5.7:
https://github.com/oyejorge/less.php...

It would be great to see the tutorial updated for the new parser and 5.7. Even better, an internal asset type with service methods.
MrKDilkington replied on at Permalink Reply
MrKDilkington