0

I am using less.js to compile less on the fly. Here's a sample of my markup:

<html>
    <head>
        <link rel="stylesheet/less" href="sample.less" type="text/css" />
        <script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/1.7.4/less.min.js"></script>
    </head>
    <body>
        <div class="box">
            abcd
        </div>
    </body>
</html>

It is not compiling less into CSS:

screenshot showing undesired results

André Dion
  • 21,269
  • 7
  • 56
  • 60
Vivek Sadh
  • 4,230
  • 3
  • 32
  • 49

2 Answers2

-1

In order to compile LESS to CSS, you should use lessc command in terminal if you're not using any task managers.

Navigate to your directory on terminal and type this command.

$ lessc path/styles.less > path/styles.css

Once this is run, refresh your browser. LESS should be converted to CSS.

Please follow http://lesscss.org/ under using "Using LESS"

JJ Kim
  • 47
  • 2
-1

There are two ways to fix this

1] Use Firefox instead of chrome as this is a known issue for chrome.

2]Run your files on any server like Apache,IIS.

kapil
  • 1,710
  • 1
  • 15
  • 12