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

12.3.186 • 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;	
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 12.3.186
    78
    • latest

Version History

Package Sidebar

Install

npm i @ctx-core/sass

Weekly Downloads

235

Version

12.3.186

License

Apache-2.0

Unpacked Size

11.9 kB

Total Files

20

Last publish

Collaborators

  • btakita