@ctx-core/sass

ctx-core sass

Stats

StarsIssuesVersionUpdatedCreatedSize
@ctx-core/sass
0012.1.274 days ago3 years agoMinified + gzip package size for @ctx-core/sass in KB

Readme

@ctx-core/sass

Processes sass with postcss & global style support.

Rollup Example

// rollup.config.js
import svelte from 'rollup-plugin-svelte'
import { preprocess_ } from '@ctx-core/svelte'
import { preprocess_sass_ } from '@ctx-core/sass'
const preprocess__sass = preprocess_sass_()
const preprocess = preprocess_([
    preprocess__sass,
    // ...
])
module.exports = {
    client: {
        // ...
        plugins: [
            // ...
            svelte({
                // ...
                preprocess,
            })
        ]
    },
    server: {
        // ...
        plugins: [
            // ...
            svelte({
                // ...
                preprocess,
            })
        ]
    },
    // ...
}

Svelte Component - <style global> Example

<div class="container">
    <div class="my-global-class">āœ”</div>
</div>

<style lang="scss" global>
    .container {
        .my-global-class {
            color: green;
        }
    }
</style>

The CSS equilavent is generated for Svelte:

:global(.container .my-global-class) {
    color: green;    
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.