@nmpilot/scssrs
v1.0.3
Published
SCSS to CSS converter for browsers.
Downloads
2
Maintainers
Readme
Welcome to SCSSRS
Scary name, awesome module.
- This is a lightweight on-demand in-browser
scss
tocss
converter. - Scssrs uses
dart-sass
at its core, along with aweb-worker
mechanism to - Compile browser side
scss
<script>
templates into<style>
tags.
Usage
<script type="module" src="node_modules/@nmpilot/scssrs/index.js"></script>
Import the module on your page.
<script type="text/plain" data-scssrs>
$color: blue;
body {
background-color: $color;
}
</script>
data-scssrs
is a required attribute
The above scss
code will be replaced by css
:
<style>
body {
background-color: blue;
}
</style>