When using <amp-experiment> plugin removes styles that are meant for experiments, for example body[amp-x-experimentName="experimentVariant"] { background: #000; }.
Styles are removed regardless of where they are added (theme's style.css / inline).
Prevent plugin from removing styles that contain an attribute that starts with amp-x- OR add a possibility for adding custom styles that won't be removed by the plugin.
<amp-experiment>style.css._Do not alter or remove anything below. The following sections will be managed by moderators only._
@bartesn @JacekKosciesza Please test the fix in this build: https://github.com/ampproject/amp-wp/pull/4438#issuecomment-603444246
@westonruter I tested the fix and it works as expected. I tested this with styles put in Custom HTML block and custom CSS file. In both cases styles with amp-x-* attribute were applied properly, the plugin doesn't remove them.
Most helpful comment
@westonruter I tested the fix and it works as expected. I tested this with styles put in Custom HTML block and custom CSS file. In both cases styles with
amp-x-*attribute were applied properly, the plugin doesn't remove them.