how to use .less files in adobe CQ5? | Community
Skip to main content
amits442971
Level 2
October 16, 2015
Solved

how to use .less files in adobe CQ5?

  • October 16, 2015
  • 5 replies
  • 2720 views

Hi All,

i'm new in Adobe CQ5, and developing CMS Application using this, i create ClienLibraryFolder in following directory:

/etc/designs/MySiteName/ClientLibFolder/MyLess.less

but when i'm using this on .jsp file it is not design anything what i defined in .less file, while using .css files i'm getting all things. can anyone suggest me what i'm missing here

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mshaji

Please review following example

http://www.citytechinc.com/us/en/blog/2012/08/less_css_in_adobecq.html

5 replies

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015
amits442971
Level 2
October 16, 2015

hi Feike thanks for your reply,
 i'm using as :<cq:includeClientLib css="etcdesigns.inmovement.ClientLibrary.base" /> 

it neither throw any error  nor solve my issue, i mean it is not including my .less files 
in ClientLibrary directory i create a css.txt file and there i put my code as:

#base=less
    desktop.less
    mobile.less
    tablet.less
desktop/heroarea.less

is anything missing here...

MshajiCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015
Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

Can you share a screenshot of your structure of your clientlib?

Also check the error.log to see if any error is logged there.

smacdonald2008
Level 10
October 16, 2015

As stated in the artilce:

To use LESS files, simply include them in your ClientLib folder, or whatever folder you have specified as your base in css.txt. List the LESS files in css.txt so they get included. They can be mixed with CSS files if you like. - See more at: http://www.citytechinc.com/us/en/blog/2012/08/less_css_in_adobecq.html#sthash.ssJbsiYg.dpuf

They are simply like using other CSS files in AEM. 

Also - when using cq:includeClientLibs - reference the categories property of the clientlibs node:

<cq:includeClientLib categories="jquerysamples" />