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

I see! Thanks for the explanation! And you mentioning `display: none` issue made me think of quite an obvious work-around/technique for both the `:target` and any dynamic initial states we could want — just use a separate element/pseudo-element that would have `display: none` initially, which would become visible with our condition.

So here — https://codepen.io/kizu/pen/qBMmJRJ — the `::before` is hidden unless its element is targeted, and it seems to work fine for what I would want to, which is awesome :)

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


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

Received on Friday, 3 March 2023 17:11:24 UTC