postcss-amp
v2.0.1
Published
PostCSS plugin to convert CSS according Accelerated Mobile Pages requirements
Downloads
6,680
Maintainers
Readme
PostCSS Amp
PostCSS plugin to convert CSS according Accelerated Mobile Pages requirements.
AMP CSS requirements: https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/
Input:
i-amp-el {
/* elements starting with i-amp- are banned
}
.boo {
transition: height 0.5s; /* non-GPU-accelerated transition properties are banned */
color: red !important; /* important is banned */
}
Output:
.boo {
/* all banned elements stripped */
color: red;
}
Usage
postcss([require('postcss-amp')]);
See PostCSS docs for examples for your environment.