postcss-deep-scopable

1.0.1 • Public • Published

postcss-deep-scopable

npm version Build Status

unified deep scoped style postcss plugin for vue

Note: This is not only supports a limited list of scoped less/sass|scss selectors but also supports custom selectors.

  • /deep/
  • >>>
  • > > >
  • your custom deep selectors

Installation

npm install --save postcss-deep-scopable

Usage

const postcss = require('postcss');
const postcssDeepScopable = require('postcss-deep-scopable');

postcss([ postcssDeepScopable() ]).process(myCss).css

// or add a custom deep css selector or selectors
postcss([ postcssDeepScopable('&scoped&') ]).process(myCss).css
postcss([ postcssDeepScopable(['&scoped&', '%reveal%']) ]).process(myCss).css

input example: custom selectors

// input scss/less...
&scoped& .app, %reveal% .main {
  text-align: center;
  color: red;
}

output example

// output css

::v-deep .app, ::v-deep .main {
  text-align: center;
  color: red;
}

License

MIT

Package Sidebar

Install

npm i postcss-deep-scopable

Weekly Downloads

28

Version

1.0.1

License

MIT

Unpacked Size

14.6 kB

Total Files

16

Last publish

Collaborators

  • litt1e-p