PostCSS plugin to convert CSS according Accelerated Mobile Pages requirements
npm install postcss-amp> PostCSS plugin to convert CSS according Accelerated Mobile Pages requirements.
AMP CSS requirements:
Input:
``css`
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:
`css`
.boo {
/ all banned elements stripped /
color: red;
}
`js``
postcss([require('postcss-amp')]);
See PostCSS docs for examples for your environment.