Skip to content

amp-custom attribute gets stripped (if react-jss is used) #12243

@cibulka

Description

@cibulka

Hello again!

Bug report

Describe the bug

It seems that if react-jss is used as described in Next.js official example, amp-custom attribute gets striped from the <style> element.

To Reproduce

I've created simple repository with two Next.js projects. Each tries to make react-jss work with AMP a bit differently with a slightly different outcomes (everything is described there).

The repo was created with create-next-app command and its only dependency is react-jss.

Repo is here: https://github.com/cibulka/nextjs-amp-jss

Expected behavior

Styles (both global and local) get applied as requested and amp-custom attribute is not stripped from markup.

System information

  • OS: macOS 10.15.4
  • Browser: Chrome 81
  • Version of Next.js: 9.3.5
  • Version of Node.js: 13.12.0

Additional context

I've created discussion topic, but it did not receieve much love.

Sorry for duplicating my question, but the current behaviour seems like a bug (not sure if with react-jss or `Next.js though).


I might be missing something obvious as this is pretty much my start with AMP.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions