Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-transition] Does transition-property: all really need special handling? #8024

Open
Loirooriol opened this issue Nov 5, 2022 · 1 comment
Labels
css-transitions-1 Current Work

Comments

@Loirooriol
Copy link
Contributor

https://drafts.csswg.org/css-transitions-1/#transition-property-property

The all value and all shorthand property work in similar ways, so the all value is just like a shorthand that covers all properties.

I think it's not obvious why <single-transition-property> = all | <custom-ident> with some special behavior for all instead of treating all as a generic shorthand.

If I get it right, the difference is that the all value affects the properties not included in the all shorthand, i.e. direction, unicode-bidi and custom properties.

The difference doesn't typically matter since direction, unicode-bidi are not animatable, and unregistered custom properties animate discretely. So it only matters for registered custom properties, right? I think this deserves a note.

But in fact, was this deliberate? Initially the all value was not allowed to appear in the list, like none, so that's why it needed special handling. 6d0e135 allowed it in the list of idents. This happened in Feb 2012 after a resolution in Nov 2011. But at that point, all was defined to include all properties:

So it seems to me that at that time, the special behavior for the all value was identical to the behavior that we would get by treating it as a reference to the shorthand all. But things changed, possibly without noticing the effect on transition-property.

I'm not a big fan of this special behavior for all. I wonder if we can:

  • Remove the special behavior for all, just treat it as other shorthands. This would only impact registered custom properties.
  • Add special behavior for -- to refer to all custom properties.
  • Optionally, add special behavior for everything (or whatever ident that does not exist as a property) to refer to all properties (i.e. the current behavior of the all value).

I think compatibility may not be a problem since:

  • Only Blink supports registered custom properties
  • Even if all stops transitioning registered custom properties, the standard properties that use the custom properties will still transition, so in simple cases the outcome will be the same.
@Loirooriol Loirooriol added the css-transitions-1 Current Work label Nov 5, 2022
@Loirooriol
Copy link
Contributor Author

Oh, seems that all doesn't transition registered properties in Blink: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/10967

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-transitions-1 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant