@garfish/css-scope
TypeScript icon, indicating that this package has built-in type declarations

1.17.6 • Public • Published

@garfish/css-scope

NPM version

Inspired by reworkcss/css.

TJ is my idol.

Usage

Need webAssembly support

import { parse, stringify } from '@garfish/css-scope';

const code = 'a { color: #fff; }';
const ast = parse(code);
const scopedCode = stringify(ast, 'App'); // #App a { color: #fff; }

Use in Garfish

import { GarfishCssScope } from '@garfish/css-scope';

Garfish.run({
  ...
  plugins: [
    GarfishCssScope({
      fixBodyGetter: true,
      excludes: ['appName'],
    }),
  ],
})

Readme

Keywords

Package Sidebar

Install

npm i @garfish/css-scope

Weekly Downloads

0

Version

1.17.6

License

MIT

Unpacked Size

52.2 kB

Total Files

6

Last publish

Collaborators

  • reothues
  • aishiguang
  • cttrevor
  • shawzhou
  • jiadi0801
  • jsongo
  • rustle
  • zengkp