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

1.19.4 • 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'],
    }),
  ],
})

/@garfish/css-scope/

    Package Sidebar

    Install

    npm i @garfish/css-scope

    Weekly Downloads

    1

    Version

    1.19.4

    License

    MIT

    Unpacked Size

    52.2 kB

    Total Files

    6

    Last publish

    Collaborators

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