Post Carousel: Fix AMP validation error
tmmbecker opened this issue · comments
Describe the bug
Newspack Post Carousel block causes AMP validation errors in GSC with this message: Usage of the !important CSS qualifier is not allowed.
To Reproduce
Steps to reproduce the behavior:
- Add a Post Carousel block to any page.
- Run AMP validation.
- View message.
It looks like the AMP tree shaker isn’t able to replace the !important
qualifiers used here:
newspack-blocks/src/blocks/carousel/view.php
Line 277 in 2f09fcf
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
Pages would pass AMP validation when using the Post Carousel block.
Edited to add: this has been reported by CalMatters and EastMojo.
Enlace reported as well.
AMP is no longer with us [*]