[css-animations] [css-transitions] Allow authors to control the time threshold for properties with a discrete animation type · Issue #9409 · w3c/csswg-drafts · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to give authors the ability to apply magic of a properties, such as content, display, content-visibility, visibility & overlay, on arbitrary properties; and make it more flexible. Something like transition-step, which accepts a list of single values from percentage, start, middle, end & auto.
I know these days this is solved by playing with keyframes or transition durations / delays, but there is a reason why certain properties have special rules, so having a common primitive for something like this would be quite helpful.
Use cases could be disabling at the start of hiding / enabling at the end of showing interactions, for example through user-select, pointer-events, touch-action, resize, overflow, overscroll-behavior & scrollbar-width; or custom properties, the values of which trigger style containers.
It might also be worth considering forcing a discrete animation type, on demand, as an aid to development for users with reduced motion needs. So that the intended property will set it for the affected properties, with the option to revert to the previous behavior via the initial normal value.