Skip to content

amp-viewer class refrences removed by css cleanup process #1946

@p2er

Description

@p2er

What's the issue?

Styling based on the class amp-viewer can not be applied, since the custom styling based on that class is removed by plugin, because amp-viewer class is not present in the static amp html file. The class is only added if the document is viewed in an AMP viewer: https://www.ampproject.org/docs/reference/components/amp-dynamic-css-classes

How do we reproduce the issue?

Positive Test

  1. Open: https://www.google.com/amp/s/www.cu-camper.com/de/magazin/kanada/kanada-campingplaetze/campingplaetze-in-westkanada/
  2. amp-viewer class present on body element
  3. classes based on amp viewer have been removed by css clean up
  4. classes based on amp viewer should be present

Negative Test

  1. Open: https://www.cu-camper.com/de/magazin/kanada/kanada-campingplaetze/campingplaetze-in-westkanada/
  2. amp-viewer class not present on body element
  3. classes based on amp viewer have been removed by css clean up
  4. classes based on amp viewer should still be present to be applied in amp viewer state after caching

What browsers are affected?

All browsers.

Which AMP version is affected?

All, since css clean up is done by plugin.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions