Replies: 1 comment
-
I also failed to get react-jss working today using CreateUseStyle pattern |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I'm experimenting with usage of AMP on Next.js. My first hangup is with styling.
I would really like to continue using react-jss as described in this official example. Is that possible?
I have two versions of my
document.js
.First implementation follows the docs. Validator does not complain, but styles are not applied. In developer tools I can see an empty
<style amp-custom />
tag. The result is the same whether I typeamp-custom
attribute to the code or not. When I turn off AMP support for given page, styling works.If I pass the styles string as props and render it myself in Head, styles do get applied. However validator throws error "The mandatory attribute 'amp-custom' is missing in tag 'style amp-custom'". And indeed, in
<head>
there is<style>
element with my styles and en empty<style amp-custom />
element. So that does not seem like a valid configuration either.What am I missing? Also should I provide a repo or is this sufficient? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions