5.0.1 • Published 7 months ago
postcss-selector-prefix v5.0.1
PostCSS Selector Prefix
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")]);