Re: [csswg-drafts] CSS transitions should allow binary styles to be changed (#7804)

We considered this at one point but one of the issues is that it is very common to see `transition: all 300ms` for example.

Indeed, the initial value of `transition-property` is `all`. So if we start treating discretely-animatable properties as transitionable, we will break a _lot_ of content that is not expecting these properties to transition (not only because there will be visual differences, but also because more transition events will be dispatched).

I suppose we could treat any explicitly listed properties as a signal to opt-in to transitioning them but there are still a few questions:

1. Would that apply to shorthands? e.g. it is common to use `transition: background 300ms` when the author really just wants to transition `background-color`. If we start transitioning `background-attachment`, `background-repeat` etc. we will possibly break content.
2. If it only applies to longhands, what happens to longhands that end up being promoted to shorthands in the future? Would we need to maintain a list of "legacy longhands" or some such?

I'm not sure what the right behavior would be here.

And even then, we wouldn't naturally produce the "change immediately after the delay" behavior, unless the author also specified a zero duration interval like in your example, or a suitable step timing function.

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


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

Received on Tuesday, 4 October 2022 03:21:20 UTC