Re: [csswg-drafts] [selectors-4] Add pseudo-class to establish before-change style for css-transitions on new elements. (#8174)

> My gut feeling is that the spec should be rewritten in a way where the following "just works", since that is what I think most web developers will expect.

If we could make this work, it would still only work for content which was already in the DOM in a previous state. E.g. I couldn't create an entry transition for a dialog which was just added or had never had style computed before.

> My initial reaction to the issue was that maybe this should be solved with a CSS property + at-rule (like scroll-linked animations for instance),

Could you write an example of what you're thinking? Or is it basically animation keyframes?

> but I realized we could already do this with @keyframes. Given the other issues around top layer animations etc. maybe this is an option that could be considered, that would solve these issues more globally.

You are absolutely right that with `@keyframes` you can already do this, apologies if I didn't call out well enough that this use case is already possible with CSS animations - I tried to make that point. This proposal is born out of concerns that keyframes are harder for simple animations. @AmeliaBR  brought this up [over here](https://front-end.social/@AmeliaBR/109445248892580801).

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


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

Received on Tuesday, 17 January 2023 20:37:14 UTC