ampproject / ampproject/amphtml
CSS Comment breaks validation
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
When a string containing disallowed class prefix is present in a CSS comment it is flagged as a validation error.
## How do we reproduce the issue?
Add a CSS comment within `` containing a disallowed class name, such as:
``` <style amp-custom> /* Can't use .i-amphtml- selectors here */ ```
## What browsers are affected?
All browsers
## Which AMP version is affected?
Probably not a new issue, first identified on a page using AMP version 2103122145004
Contributor guide
Research direction
Reproduce the issue by placing a disallowed class prefix in a comment inside , then trace the CSS validation entry point that reports the error. The fix is complete when such comments are ignored while actual disallowed selectors remain flagged, with the relevant validation checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100