1.0.3 • Published 7 months ago

@nmpilot/scssrs v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Welcome to SCSSRS

Scary name, awesome module.

  • This is a lightweight on-demand in-browser scss to css converter.
  • Scssrs uses dart-sass at its core, along with a web-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>