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

> Whether to start a transition also seems to depend on the before-change transition duration ([demo](https://jsbin.com/pubineq/5/edit?html,css,js,output)) though it's unclear from [the spec](https://www.w3.org/TR/css-transitions-1/#matching-transition-duration) whether this is right.

@flackr That demo has a mistake which makes it seem like the before-style matters (for the transition properties), but it actually doesn't ([fixed demo](https://jsbin.com/wugecum/edit?html,css,js,output), the difference is the `<div class="target closed">` part). Spec also seems clear that the "matching transition property value" (etc) is taken from the after-change style. So I think we're good?
 
> Also, will this support combinator selectors from :initial?

Right ... so e.g. does `.a:initial > .b` imply that a before-change style for `.b` exists? That sounds complicated. Maybe this concept is closer to a _pseudo-element_: we could use `dialog::initial` instead to avoid all these questions. Pseudo-elements representing a real element in a certain state is not entirely without precedent (`::slotted()`), although a pseudo-element being its own originating element is perhaps new. :-)

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


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

Received on Thursday, 8 December 2022 12:13:14 UTC