Re: [csswg-drafts] [css-transitions] Transition to height (or width) "auto" (#626)

The CSS Working Group just discussed `[css-transitions] Transition to height (or width) "auto"`, and agreed to the following:

* `RESOLVED: Animation to/from keyword sizes requires an opt-in, so by default only get transition ifa t least one side gets calc-size()`

<details><summary>The full IRC log of that discussion</summary>
&lt;khush> > if that returns pseudo-element animations?<br>
&lt;khush> flackr can confirm. I think it's supposed to.<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/626#issuecomment-2071016522<br>
&lt;fantasai> dbaron: We discussed calc-size() proposal. One question was whether we could, instead of or in addition to calc-size(), write what people want to write<br>
&lt;fantasai> dbaron: concern was compat, but did we check<br>
&lt;fantasai> dbaron: one thing I followed up with, since I had implemented, I could implement the natural behavior where you could just transition '0x' to 'auto'<br>
&lt;fantasai> dbaron: I could figure out what could break<br>
&lt;fantasai> dbaron: There's more details in the comment in the issue, but basically what I did was a very conservative study<br>
&lt;fantasai> dbaron: ran through loading top 1000 sites with a special build<br>
&lt;fantasai> dbaron: Even with that limit, I found multiple pages that would break with this change<br>
&lt;fantasai> dbaron: [gives some examples]<br>
&lt;fantasai> dbaron: Several pages animating widths and heights from zero that was not expected<br>
&lt;fantasai> dbaron: at the same time, there was a page on ups.com with an animation that got better<br>
&lt;fantasai> dbaron: but conclusion was, given this very small and conservative sample shows multiple pages that are broken<br>
&lt;flackr> q+<br>
&lt;fantasai> dbaron: we know it's not web-compatible<br>
&lt;fantasai> dbaron: so we know we can't just support CSS tranistion from 0px to auto and equivalents<br>
&lt;fantasai> dbaron: given that, what I want to get out of this is to restate more firmly that we want to move forward with calc-size()<br>
&lt;fantasai> dbaron: given alternative, which would have better developer ergonomics, is not compatible<br>
&lt;astearns> ack flackr<br>
&lt;fantasai> flackr: agree we can't just do it automatically<br>
&lt;fantasai> flackr: what about having a more generic opt-in for authors?<br>
&lt;fantasai> flackr: calc-size() require for each item to change the styling<br>
&lt;fantasai> flackr: whereas a switch could opt in your whole page<br>
&lt;fantasai> dbaron: we could consider something like that<br>
&lt;fantasai> dbaron: maybe use transition-behavior, which is designed to do that<br>
&lt;fantasai> dbaron: it's reset by the transition shorthand<br>
&lt;fantasai> flackr: it's also about transitions only, not animation<br>
&lt;fantasai> dbaron: I think we can do both<br>
&lt;fantasai> dbaron: current behavior with calc-size(), to get the animation you have to wrap at least one endpoint in calc-size()<br>
&lt;fantasai> dbaron: I also do worry about global overrides<br>
&lt;fantasai> dbaron: because pages are built from smaller components<br>
&lt;astearns> ack fantasai<br>
&lt;fantasai> fantasai: Agree with flackr<br>
&lt;TabAtkins> I'm completely fine with a value that can turn on the transition behavior for general values, fwiw, so long as the default behavior requires using calc-size() on at least one side.<br>
&lt;fantasai> fantasai: I think putting in transition-behavior is good, not global, easy to incorporate into transitions and gets reset whenever you do a different ransition<br>
&lt;fantasai> fantasai: for animations, could consider something in the @keyframes rule, so that it gets associated with the keyframes and used wherever the keyframes get used<br>
&lt;fantasai> astearns: but agree that doesn't preclude using calc-size()<br>
&lt;fantasai> fantasai: yes<br>
&lt;fantasai> TabAtkins: Proposed resolution, by default, only get transition if at least one side gets calc-size()<br>
&lt;fantasai> RESOLVED: Animation to/from keyword sizes requires an opt-in, so by default only get transition ifa t least one side gets calc-size()<br>
&lt;fantasai> s/ifa t/if at/<br>
&lt;fantasai> dbaron: At this point it's prototyped in Chromium, but it's getting more stable and closer to matching spec at this point<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/626#issuecomment-2101014632 using your GitHub account


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

Received on Wednesday, 8 May 2024 16:57:41 UTC