ampproject / ampproject/amphtml
Adding class from amp-access
Open
P3: When Possible
Stale
Type: Feature Request
WG: monetization
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I have a case when I need to add a class if amp-access is true.
```
{content}
{limitedContent}
```
As I understand, now we can just hide our elements.
I think it would be cool if we could add css class based on amp-access condition
For Example:
```
{content}
```
Contributor guide
Research direction
Start by tracing the existing amp-access behavior described in the issue and how its conditions are evaluated. Determine where an amp-access-class attribute could be handled, then verify that the requested condition adds the appropriate class for both true and false outcomes and does not rely on hiding the elements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100