Allow negated prefers-reduced-motion media queries in AMP validator#40454
Allow negated prefers-reduced-motion media queries in AMP validator#40454Durvesh-dev wants to merge 6 commits intoampproject:mainfrom
Conversation
|
Hi @erwinmombay 👋 This PR updates the AMP validator to allow negated All CI checks are passing. Thanks! |
|
thanks @Durvesh-dev , reviewing. |
banaag
left a comment
There was a problem hiding this comment.
Could you add a validator test for this? Something like: https://github.com/ampproject/amphtml/pull/39558/files#diff-cf571d8f18ca528dbc7956b0a627f9f486ef84b415beaf3ba4a4d6355b4cb4bf
|
Could you please help us with these changes when you get a chance? They’re currently affecting our client’s live site, so we’d really appreciate your support on this. |
|
Thanks for the suggestion! I’ve added a validator test for the negated prefers-reduced-motion media query in: validator/testdata/feature_tests/everything.html Please let me know if anything else should be adjusted. |
Summary
Fixes AMP validator incorrectly flagging valid CSS media queries using
not (prefers-reduced-motion: reduce)as malformed.Details
notas a valid media query modifier in the validator specMotivation
This syntax is valid per CSS Media Queries Level 5 and is already used in
AMP documentation (e.g. amp-animation).
Fixes #40384