@modular-css/svelte

    28.2.1 • Public • Published

    @modular-css/svelte NPM Version NPM License NPM Downloads

    Svelte preprocessor support for modular-css.

    Process inline <style type="text/m-css"> or <link> or import styles from "./foo.css"; references inside your Svelte components using the full power of modular-css. Dynamic references will be replaced where possible with static ones, allowing for greater compile-time optimizations, smaller bundles, and even faster runtime performance!

    Example

    Turns this

    <div class="{css.main}">
        <h1 class="{css.title}">Title</h1>
    </div>
    
    <style>
        .main {
            ...
        }
    
        .title {
            ...
        }
    </style>

    into what is effectively this

    <div class="abc123_main">
        <h1 class="abc123_title">Title</h1>
    </div>

    See the svelte section on m-css.com for more details.

    Install

    npm i @modular-css/svelte

    Homepage

    m-css.com

    DownloadsWeekly Downloads

    19

    Version

    28.2.1

    License

    MIT

    Unpacked Size

    15.2 kB

    Total Files

    8

    Last publish

    Collaborators

    • tivac