@flemist/postcss-wrap
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

NPM Version NPM Downloads Build Status Test Coverage

Usage

import postcssWrap from '@flemist/postcss-wrap'

const input = '.class1{} .class2{}'
const output = await postcss(postcssWrap({
  type: 'atrule',
  props: {
    name: 'media',
    params: '(prefers-color-scheme: dark)',
  },
})).process(input)

// output: @media (prefers-color-scheme: dark) {.class1{} .class2{}}
import postcssWrap from '@flemist/postcss-wrap'

const input = '.class1{} .class2{}'
const output = await postcss(postcssWrap({
  type: 'rule',
  props: {
    name: 'media',
    selectors: ['.app', '.dev'],
  },
})).process(input)

// output: .app, .dev {.class1{} .class2{}}

Package Sidebar

Install

npm i @flemist/postcss-wrap

Weekly Downloads

2

Version

0.0.5

License

ISC

Unpacked Size

5.96 kB

Total Files

6

Last publish

Collaborators

  • nikolay_makhonin