Reputation: 63
Came across the star rating example here: https://amp.dev/documentation/examples/interactivity-dynamic-content/star_rating/?format=websites
Granted it falls under "websites", but I tried including it for an email application demo. The hover effects was working within Gmail Amp for Email Playground and the code passed validation. However, when I sent a test to my gmail account, the star size is very small and the hover effect does not work as far as I can see. Has anyone gotten the star rating to work for Email or is it beyond scope for email?
Thank you in advance for your thoughts and time.
Amp for Email Playground
Gmail
Upvotes: 0
Views: 723
Reputation: 133
This is be because the example that you are looking at uses css variables some of which are not allowed in amp-email, though you can use a few pseudo-classes.
Taken from the link you gave above:
--star-size: 3; /* use CSS variables to calculate dependent dimensions later */
You can find the list of supported css here https://github.com/ampproject/amphtml/blob/master/spec/email/amp-email-css.md
Upvotes: 0