1.0.3 • Published 2 years ago
@nmpilot/scssrs v1.0.3
Welcome to SCSSRS
Scary name, awesome module.
- This is a lightweight on-demand in-browser
scsstocssconverter. - Scssrs uses
dart-sassat its core, along with aweb-workermechanism 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-scssrsis a required attribute
The above scss code will be replaced by css:
<style>
body {
background-color: blue;
}
</style>