RESOLVED DUPLICATE of bug 279012 279013
Transitioning Registered Custom Properties with discretely animatable syntaxes cause a transition loop
https://bugs.webkit.org/show_bug.cgi?id=279013
Summary Transitioning Registered Custom Properties with discretely animatable syntaxe...
Bramus
Reported 2024-09-02 03:53:17 PDT
(This bug was discovered while building `@bramus/style-observer`, a library that responds to changes in computed styles. For this it relies on CSS Transitions and `transition-behavior: allow-discrete`. See https://brm.us/style-observer for details about this library.) Transitioning Registered Custom Properties with discretely animatable syntaxes cause a transition loop - Demo: https://allow-discrete-bugs.netlify.app/safari/registered-discrete-loop/ – the custom properties `--variable1` and `--variable2` are registered with @property. The former as a `<number>` and the latter as a `<custom-ident>` - Expected behavior: When clicking the `--variable2` button, the output should change and the transition should have triggered only once. - Actual Behavior: While the output does change, the transition is repeatedly triggered. You can verify this by checking the console, which logs `"_handleUpdate"` on `transitionstart`. This does not happen when clicking the `--variable1` button. - Noteworthy: When changing `--variable2` to a syntax of `<string>` it also doesn’t work, which leads me to believe that this behavior shows for all syntaxes that cannot be interpolated. Tested in Safari Technology Preview 202
Attachments
Bramus
Comment 1 2024-09-02 05:26:24 PDT
Correction: the `--variable2` property is registered as `*`. When having it set up as a `<custom-ident>` (with a proper `initial-value`) it works fine.
Antoine Quint
Comment 2 2024-09-02 07:06:41 PDT
Hi Bramus, thanks for the report. I'll probably get to it myself eventually, but could you perhaps make a reduction that does not involve any third-party script? It could help reduce the complexity and help identifying the source of the bug. Thank you.
Antoine Quint
Comment 3 2024-09-03 02:30:05 PDT
This is the same underlying issue as bug 279012. *** This bug has been marked as a duplicate of bug 279012 ***
Note You need to log in before you can comment on or make changes to this bug.