How can I compile LESS files within browser

后端 未结 4 1783
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-10 13:41

I created code for switching themes using LESS functionality. Unfortunately the LESS files will not compile in browser. How can I compile LESS files within browser?

4条回答
  •  悲&欢浪女
    2020-12-10 14:04

    This is a piece of documentation:

    Client-side usage

    Link your .less stylesheets with the rel set to “stylesheet/less”:

    Then download less.js from the top of the page, and include it in the element of your page, like so:

    Make sure you include your stylesheets before the script.

    So, you need to:

    1. place link tag before script tag
    2. set rel to “stylesheet/less”
    3. be aware of bug in chrome

提交回复
热议问题