ampproject / ampproject/amp-toolbox-php
Server side rendering breaks validation (amp4ads)
- Dominant language
- PHP
- Stars
- 74
- Forks
- 25
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 3
Description
SSR is breaking the page validation due !important declaration included in amp-ad-0.1.js:
`html{overflow-x:hidden!important}html.i-amphtml-fie{height:100%!important;width:100%!important}html:not([amp4ads]),html:not([amp4ads]) body{height:auto!important}html:not([amp4ads]) body{margin:0!important}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y ...
`
I've tried removing AmpRuntimeCss:
```
$configurationData = [
Configuration::KEY_TRANSFORMERS => [
Transformer\AmpBoilerplate::class,
Transformer\ServerSideRendering::class,
Transformer\ReorderHead::class,
Transformer\OptimizeHeroImages::class,
Transformer\TransformedIdentifier::class,
],
];
$transformationEngine = new TransformationEngine(new DefaultConfiguration($configurationData), $cachedRemoteRequest);
```
But empty tag was generated:
``
And it breaks the validation again.
Regards.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.