Re: [csswg-drafts] [animation-triggers-1] Proposal: toggle Custom States using Animation Triggers (`state-trigger`) (#13579)

I think you can set up generic state-like changes with animation triggers with something like this:
```css
@keyframes state-foo { to {--state: foo;} }
.target {
  animation: state-foo forwards;
  animation-trigger: --in-view;
  timeline-trigger: --in-view view();
  @container style(--state: foo) {
    /* Style descendants after state change */
  }
}
```

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13579#issuecomment-4164427288 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 31 March 2026 18:01:27 UTC