LESS.js provides an easy way to integrate Less stylesheets into HTML:
<link rel="stylesheet/less" href="main.less" type="text/css"> <script src="less.js" type="text/javascript"></script>
However, while Sass.js exists, it's primarily intended for use with Node.js, employing a different syntax:
const sass = require('sass') sass.render('... string of sass ...') // => '... string of css ...'
Currently, there is no official JavaScript implementation for SASS/SCSS, and while there are ongoing projects, none are considered suitable for production use.
Considerations for JavaScript Compilation:
It's important to note the following considerations:
Therefore, the Sass core team and LESS developers recommend server-side compilation for optimal performance and maintainability.
위 내용은 SASS/SCSS를 위한 프로덕션용 JavaScript 구현이 있습니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!