Neanderthals Paint Mammals

    @ctx-core/sass
    TypeScript icon, indicating that this package has built-in type declarations

    12.1.70 • Public • Published

    @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/node'
    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;	
    }

    Install

    npm i @ctx-core/sass

    DownloadsWeekly Downloads

    10

    Version

    12.1.70

    License

    Apache-2.0

    Unpacked Size

    62 kB

    Total Files

    43

    Last publish

    Collaborators

    • btakita