Programmatically editing Less (css) code with JQuery-like selector syntax?

前端 未结 6 1761
萌比男神i
萌比男神i 2020-12-05 21:02

It\'s possible to use libraries in less.js to dynamically regenerate css from less files within the browser. If there was an easy way to modify less code, this would be an e

6条回答
  •  再見小時候
    2020-12-05 21:43

    first of all javascript can't write to a file. The best you'll be able to do is get Javascript to read and edit the XML then post that data to a server-side script to write to file.

    well in general people use a different class to address this issue and replace the existing class with the new class rather than go edit the css file itself, which sounds pretty weird to me..

    I stumbled upon this blogpost may be this is what you are looking for.. he shows different ways to get news stylesheets based on your requirement.

提交回复
热议问题