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

> How would that mix with the non-::initial styles. Would you need to repeat all the styles that do not differ between ::initial and not, or do you apply the pseudo element styles on top of the other styles somehow?

I think the pseudo-element styles would apply on top of the non-pseudo-element styles; you wouldn't need to repeat them.

> Just want to drop a few things: I think me and a lot of other developers would for sure want to use this for styling the initial state of pseudo-elements, and if it in itself would look like one, having something like `::before::initial` would be rather weird. Also, I really-really don't want us to mix the pseudo-classes and pseudo-elements.

I think with *either* a pseudo-class or a pseudo-element, it would need to work with `::before` and `::after` -- that is, either `::before:initial` or `::before::initial` would need to work.

If we went with something with an at-rule, I agree that I'd prefer something that looked more like conditional rules (except without any condition), that is, an at-rule containing style rules (with selectors and declarations).

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


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

Received on Thursday, 2 March 2023 14:24:06 UTC