AMP validator issues warning for `@media` User Preference features.
Author: milindmore22Created Aug 25, 2025Updated Jan 27, 2026
LabelsType: BugType: Feature Requestneeds sizing
Description
The AMP validator is flagging a warning for a CSS media query using the not (prefers-reduced-motion: reduce) syntax. While this syntax is valid in modern browsers, the AMP validator seems to have stricter parsing rules that cause it to be misinterpreted.
This issue impacts accessibility features, as the styles intended for users without a preference for reduced motion are not being applied correctly in the validated AMP version.
@media not (prefers-reduced-motion: reduce) {
.wp-block-image amp-img.hide {
visibility: hidden;
}
}Reproduction Steps
- Add the problematic CSS code to the
Source: ampproject/amphtml