@sardine/lightningcss-plugin-global-composes
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@sardine/lightningcss-plugin-global-composes

A Lightning CSS plugin that does things to CSS.

Use case

A LightningCSS plugin to compose selectors

Similar to the composes property in CSS Modules, this plugin allows you to compose selectors in a global context.

Unlike CSS Modules composes, this plugin expects a @ symbol before, @composes to avoid any confusion with a possible CSS spec in the future.

Installation

npm install --save-dev @sardine/lightningcss-plugin-global-composes

How to use

import { transform } from "lightningcss";
import globalComposes from "@sardine/lightningcss-plugin-global-composes";

const { code } = bundle({
  filename: "style.css",
  minify: true,
  visitor: composeVisitors([globalComposes({ source: "./css/globals.css" })]),
});

Readme

Keywords

Package Sidebar

Install

npm i @sardine/lightningcss-plugin-global-composes

Weekly Downloads

24

Version

1.0.1

License

MIT

Unpacked Size

4.75 kB

Total Files

4

Last publish

Collaborators

  • petinga
  • marabyte