Bug 232361 - [CSS transition] can't use CSS logical properties in transition syntax
Summary: [CSS transition] can't use CSS logical properties in transition syntax
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks: 236078
  Show dependency treegraph
 
Reported: 2021-10-26 19:45 PDT by Paul Li
Modified: 2022-02-05 13:26 PST (History)
7 users (show)

See Also:


Attachments
sample code for this issue (103.60 KB, image/png)
2021-10-26 19:45 PDT, Paul Li
no flags Details
Patch (8.53 KB, patch)
2022-02-05 10:00 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Li 2021-10-26 19:45:48 PDT
Created attachment 442557 [details]
sample code for this issue

Steps to reproduce the problem
1. Set CSS logical properties > "inline-size" for element's size.
2. Add CSS transition syntax for logical properties. Such as "transition: inline-size 200ms ease;"

What is the expected behavior?
1. element should have animation effect when "inline-size" changed.

What went wrong?
1. element just "jump" to final "inline-size" value without animation effect.


Sample code:
<style>
.test-target {
  inline-size: 300px;
  block-size: 300px;
  background-color: rgba(255,0,0,.3);
  outline: 0 none;
  transition: inline-size 200ms ease;
}

.test-target:focus {
  inline-size: 600px;
}
</style>

<div class="test-target" tabindex="0">
</div>
Comment 1 Radar WebKit Bug Importer 2021-11-02 19:46:16 PDT
<rdar://problem/84958347>
Comment 2 Antoine Quint 2022-02-01 02:42:34 PST
That's correct, I don't think we support animating logical properties (yet).
Comment 3 Antoine Quint 2022-02-01 03:20:01 PST
That's right, we need to implement this part of the "Calculating computed keyframes" section of the Web Animation spec:

    For logical properties [CSS-LOGICAL-1], add the equivalent physical properties
    [CSS-WRITING-MODES-4] based on the computed value of writing-mode and/or
    direction for the effect target.

https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes
Comment 4 Antoine Quint 2022-02-05 10:00:22 PST
Created attachment 450989 [details]
Patch
Comment 5 EWS 2022-02-05 13:26:38 PST
Committed r289161 (246857@main): <https://commits.webkit.org/246857@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450989 [details].