[csswg-drafts] [css-transition] Does `transition-property: all` really need special handling? (#8024)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transition] Does `transition-property: all` really need special handling? ==
https://drafts.csswg.org/css-transitions-1/#transition-property-property

> The [`all`](https://drafts.csswg.org/css-transitions-1/#valdef-transition-property-all) value and [`all`](https://drafts.csswg.org/css-cascade-5/#propdef-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. 6d0e135e66b1aff8fe5cfb9f3c0f8d1dadfdbae2 allowed it in the list of idents. This happened in Feb 2012 after [a resolution in Nov 2011](http://lists.w3.org/Archives/Public/www-style/2011Nov/0709.html). But at that point, `all` was defined to include all properties:
 - It included `unicode-bidi` and `direction`, [this didn't change until Jul 2013](https://github.com/w3c/csswg-drafts/commit/3c2dbbea48412f206be563e874f051919886c25e).
 - CSS Variables [had just been created in Sep 2011](https://github.com/w3c/csswg-drafts/commit/f18c115ea3830268a18e01c00a4a0b5a0ed66c94), and [the interaction with `all` wasn't noticed/addressed until Aug 2018](https://github.com/w3c/csswg-drafts/commit/d75749854fe6dc35377ce3aad9f09f5cfa4a0db1)
 - The CSS Properties and Values spec that introduced registered properties [wasn't created until Feb 2015](https://github.com/w3c/css-houdini-drafts/commit/5d79aac028aa2f64f0857d1887ff19ebe0c5bd96)

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.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8024 using your GitHub account


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

Received on Saturday, 5 November 2022 19:05:38 UTC