Re: [csswg-drafts] [css-animations-2, css-transitions-2] Entry and exit animations for top-layer elements (#8189)

> A new specialized property, on the other hand, avoids this concern - you can naively set a transition on the property, and it only applies in the expected situation.

I do see the issue, but toying around with z-index outside of the top layer and toggling with that same element in & out of the top layer seems like an unlikely situation. The most common case is having a static z-index or none and toggling in & out of the top layer.

> All told z-index is similar thematically to top layer, but in virtually every specific it's different, and conflating them is imo likely to lead to significantly more confusion than not.

I'm aware of the specifics (having implemented top layer in WebKit) and also of the style adjustments associated with top layer, though not sure it's significant from a web developer perspective.

> A new property requires new learning, sure, but the purpose of the new property is very narrow in the first place (it exists solely to allow an author to add a transition that delays its value change, which is pretty narrow and specific).

As you mentioned in your first edit, it is weird :) It is also unprecedented in CSS to have properties that exist only for transitions. This is why it would be nice to think a bit more about it. I'm not advocating specifically for the `z-index` proposal, but more for an alternative proposal. A new property is _ok_ but the standard should be higher for a spec, given they last once you implement them on the web.




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


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

Received on Thursday, 30 March 2023 23:00:52 UTC