Skip to content

Conversation

@Durvesh-dev
Copy link

@Durvesh-dev Durvesh-dev commented Dec 17, 2025

Summary

Fixes AMP validator incorrectly flagging valid CSS media queries using
not (prefers-reduced-motion: reduce) as malformed.

Details

  • Adds not as a valid media query modifier in the validator spec
  • Adds a validator CSS test to prevent regressions

Motivation

This syntax is valid per CSS Media Queries Level 5 and is already used in
AMP documentation (e.g. amp-animation).

Fixes #40384

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2025

CLA assistant check
All committers have signed the CLA.

@Durvesh-dev Durvesh-dev reopened this Dec 17, 2025
@Durvesh-dev
Copy link
Author

Hi @erwinmombay 👋

This PR updates the AMP validator to allow negated
prefers-reduced-motion media queries, which are already documented
and used in AMP components.

All CI checks are passing.
Could you please take a look when you have time?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AMP validator issues warning for @media User Preference features.

2 participants