Skip to main content
Inspiring
June 27, 2017
Answered

How to use .less files instead of .css with Dreamweaver CS6

  • June 27, 2017
  • 1 reply
  • 1373 views

Hi,

My backend developer wants me to use a .less file instead of .css.  I have added it to extensions.txt and MMDocumentTypes.xml but I can't get Dreamweaver to recognize that I want that .less file as my stylesheet.  I've opened the file while I'm working with the site but it won't recognize it as the stylesheet.  By that I mean that when I create a new CSS rule, I can't choose the .less file to save the new rule on.   What am I doing wrong?  I'm on CS6 and Windows 7. 

THANKS!!

    This topic has been closed for replies.
    Correct answer P B

    When I still had CS6, I kept it open along with Brackets.

    1. I made changes to the LESS file in Brackets & hit Ctrl+S to save.
    2. The auto-compile extension compiled & minified my CSS code from the LESS, variables and mixins.
    3. In CS6, I accepted changes to files that were edited outside DW.

    Nancy


    My backend dev said I can continue to create the code in DW on my .css stylesheet and literally paste the code onto a .less document, also open in DW, and upload that .less document.  I don't want to minify it or anything so I think that will work.  Sounds very workable. 

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    June 27, 2017

    I think your backend developer is assuming code knowledge that you don't have.

    1) .LESS is a CSS pre-processor language.   It's not the same as CSS code.  It's not usable until it's compiled as CSS code.  And legacy CS6 does not support that.  

    2) You must NOT use Designer Panels to create LESS code.  You must code manually in code view using LESS syntax.  See lilnk below for details.
    Getting started | Less.js

    3)  You cannot link HTML documents directly to .less files.  You link HTML to the compiled .css file.

    To work with LESS, I suggest you download Brackets and the auto-compiler Extension.

    Or else, step up to CC 2017 which has full support for LESS & SASS files.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    June 27, 2017
    Nancy O'Shea— Product User & Community Expert