Attaching a SCSS to HTML docs [closed]

You can not “attach” a SASS/SCSS file to an HTML document.

SASS/SCSS is a CSS preprocessor that runs on the server and compiles to CSS code that your browser understands.

There are client-side alternatives to SASS that can be compiled in the browser using javascript such as LESS CSS, though I advise you compile to CSS for production use.

It’s as simple as adding 2 lines of code to your HTML file.

<link rel="stylesheet/less" type="text/css" href="https://stackoverflow.com/questions/19215517/styles.less" />
<script src="less.js" type="text/javascript"></script>

Leave a Comment