AMP 在使用 <amp-social-share> 时注入不需要的样式`style="top: calc(0px);`

AMP injecting undesired styles `style="top: calc(0px);` when using <amp-social-share>

我正在尝试在 masthead/nav 下方显示一个社交分享栏。现在由于我无法控制的内联样式,它被遮盖了。

这是我的包装器 div 在产品上的样子。

<div id="sharebar_801" class="sharebar-inline-desktop sharebar-wrapper sharebar-inline-mobile" i-amphtml-fixedid="F1" style="top: calc(0px);">

奇怪的是在沙箱和本地,它没有style="top: calc(0px);"

我不能用 !important 覆盖它,因为那样会破坏验证,为什么会有那个样式,我该怎么做才能删除它?

简短的回答是,这样做是为了自动调整元素以在查看器应用程序的可移动顶部栏中正确表现。

0px 应该是您的样式定义的实际计算值(因此,并不总是 0)。如果这不起作用,则 AMP 中可能存在错误。在这种情况下,请在 https://github.com/ampproject/amphtml/issues/new

上提交带有小重现案例的错误