Ved32
Ved32

Reputation: 1

How to use SCSS embedded in html file?

I want to use SCSS embedded in html file. Like this:

<style type="text/scss">

I've heard that there's a transpiler file for TypeScript which could also be used as a cdn. Is there such a thing for SCSS too?

Upvotes: 0

Views: 1524

Answers (2)

parham zare
parham zare

Reputation: 18

you can use watch sass extension or add watch sass to your package(npm or yarn ...) to compile sass to css and add that main.css file to your html file.

Upvotes: 0

Connor Kuo
Connor Kuo

Reputation: 459

There isn't a client-side script for Sass / SCSS.

But another CSS pre-processor LESS has.

With LESS, simply use:

<link rel="stylesheet/less" href="EXAMPLE_FILE.less" type="text/css"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/less.min.js" crossorigin="anonymous"></script>

Upvotes: 1

Related Questions