Pages

Monday 10 March 2014

Issues when using LESS CSS in Adobe CQ/AEM

When working with LESS CSS in adobe CQ, make a note point during your check in/packaging.

When you open a page, the .less files are converted to .css files as shown below:

etc/designs/myapp/
                         css/static.less

etc/designs/myapp/
                         css/generated/static.css
                         css/static.less

In this case, make sure you should not check in/package your generated folder and its sub folders/files. What you want to check in/package is just your .less files. 

If you check in/package the generated folder, you may run in to issues when your less  files are updated. This means, when a less file is updated, the generated css file may not update with the latest code all times.


3 comments:

  1. Could you please elaborate the usage of .less files?
    Do we need to create the generated folder under our folder structure?

    Thanks,
    Sony

    ReplyDelete
  2. No. we need not to create any folders. We only need to create .less files. When a page loads, .less file gets compiled, generates a .css file and puts it under "generated" folder. Even this generated folder also created by LESS compiler.

    But, when we want to check in these less files to any repositories like SVN, we only wanted to check in .less files not the generated .css files.

    Let me know if you still have any confusion.

    -Ramakrishna

    ReplyDelete
  3. ery useful information. thanks for sharing.

    Get all recruitment details like bank recruitment.

    ReplyDelete

Converting InputStream to String

    private String convertToString(InputStream inputStreamObj)             throws IOException {         if (inputStreamObj != null) {     ...