Is it possible to inline LESS stylesheets?

David Wolever picture David Wolever · Oct 11, 2011 · Viewed 14.7k times · Source

For example, is it possible to do something like:

<style type="text/less">
  #foo {
    .bar {
       font-weight: bold;
    }
  }
</style>

Answer

Otto Coster picture Otto Coster · Mar 14, 2012

You actually need to use

<style type="text/less">

instead of:

<style type="stylesheet/less">

Otherwise it won't work.

Remember to place the <style> element before the <script> element to load less.js.