postcss-selector-prefix

5.0.1 • Public • Published

NPM version ci

PostCSS plugin to add a selector prefix to all selectors.

/* Input example */
html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
body {
  margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}
/* Output example */
#pefix {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
#pefix {
  margin: 0;
}
#pefix article,
#pefix aside,
#pefix details,
#pefix figcaption,
#pefix figure,
#pefix footer,
#pefix header,
#pefix hgroup,
#pefix main,
#pefix menu,
#pefix nav,
#pefix section,
#pefix summary {
  display: block;
}

Usage

postcss([require("postcss-selector-prefix")("#prefix")]);

Package Sidebar

Install

npm i postcss-selector-prefix

Weekly Downloads

70

Version

5.0.1

License

MIT

Unpacked Size

6.79 kB

Total Files

5

Last publish

Collaborators

  • robkorv