-
Notifications
You must be signed in to change notification settings - Fork 715
[css-logical] Logical properties should be animatable like the physical ones #2751
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
Comments
From memory, we began implementing this in Firefox but never finished it. It's complicated by the fact that you can also animate the #element {
margin: 50px 100px;
animation: yer 5s;
}
@keyframes yer {
to { margin-inline-start: 200px; writing-mode: vertical-lr; }
} As a result you can't just do the mapping to physical properties when you set up the animation. Instead you need to re-evaluate the mapping whenever the animated value of the |
If that's where the difficulty is from, maybe we should put |
(I should clarify that responding to changes in the animated value is more difficult than responding to other changes in the computed value. In order to avoid triggering transitions due to animations, UAs need to distinguish between non-animated style updates and animated style updates. In Gecko we do this using a separate style resolution step for animations and I suspect in order to do transitions properly with regards to inheritance, other UAs will need to do something similar, if they don't already. As a result, while non-animation related changes will get picked up naturally during the animation styling, changes due to animation itself need special handling. We already have a similar situation with |
@upsuper Currently |
@Loirooriol Bikeshed is auto-filling the Animatable line in the propdef tables. :( It should really stop doing that. If the spec left out the Animatable line, it should either leave it out of the output or post an error. |
Yes, we should update Writing Modes spec to say "Animation type: none" since "Animatable: no" is often taken to mean "Animation type: discrete" (after we resolved that properties should be animatable by default and only a very small subset of properties should be marked as explicitly not animatable). |
Just as a reminder, |
The Working Group just discussed
The full IRC log of that discussion<TabAtkins> Topic: animating writing-mode/direction<birtles> Github: https://github.com//issues/2751 <TabAtkins> birtles: Like françois says, animation is tricky because they share the same computed properties <TabAtkins> birtles: and animations works on computed values, so you need to do mapping to computed proeprties befor eyou animate <TabAtkins> birtles: This is different to font-size <fantasai> Actually, writing-mode, direction, and text-orientation aren't currently animatable anyway <TabAtkins> birtles: There the dependency is between property *values*, but here it's a dependency between properties themselves <fantasai> https://www.w3.org/TR/css-writing-modes-3/#direction <TabAtkins> birtles: In gecko, we distinguish between properties from animation, and changes from OM. <fantasai> https://www.w3.org/TR/css-writing-modes-3/#propdef-writing-mode <TabAtkins> birtles: Re-resolving that mapping in response to aniation change is harder than in response to OM change <TabAtkins> birtles: So it does add significant complexity <TabAtkins> birtles: I think if we say they're not we still need to update the mapping from OM, and that's some complexity, but much less. <TabAtkins> florian: Any use-case for animating? <fantasai> [tab tries to imagine a use case, other ppl say it's not very credible use case] <fantasai> heycam: Why are direction and unicode-bidi excluded from all? <fantasai> TabAtkins: They shouldn't have been in CSS in the first place, they're really content attributes <TabAtkins> fantasai: They're already described as "animatable: no" <TabAtkins> florian: It's unclear whether that's the old meaning of "no" (meaning "discrete"), or the new sense (meaning not animatable) <TabAtkins> fantasai: Currently unicode-bidi says "discrete" and the rest say "no", which doesn' tmake a lot of sense <TabAtkins> astearns: So the proposed resolution is to take direciton/writing-mode/unicode-bidi and make them not animatable <TabAtkins> shane: This'll be confusing for authors if they do put them in keyframes <TabAtkins> fantasai: Authors already shoudln't be using direction or unicode-bidi in stylesheets <TabAtkins> shane: That's a good argument in general, then! <TabAtkins> RESOLVED: Fix unicode-bidi to be non-animatable, and make sure all propdefs are using the proper terminology. <TabAtkins> frremy: With this resolution, I"m much happier about the previous topic. |
Per w3c/csswg-drafts#2751 MozReview-Commit-ID: GCG3vJWNPfC
Per w3c/csswg-drafts#2751 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1473779 gecko-commit: 8e815e6e442be7255528d81891cc70401e3f07ce gecko-integration-branch: mozilla-inbound gecko-reviewers: heycam
Per w3c/csswg-drafts#2751 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1473779 gecko-commit: 8e815e6e442be7255528d81891cc70401e3f07ce gecko-integration-branch: mozilla-inbound gecko-reviewers: heycam
Per w3c/csswg-drafts#2751 Bug: 1473779 Reviewed-by: heycam
@emilio your FF patch only makes But my reading of that csswg thread was that we needed to more properties non-animatable namely: Since the specifications have not been updated yet can someone please clarify the exact change? PS: I just found our about your patch since my Chromium patch conflicted with your wpt test changes. Yay for wpt despite more conflict 😉 |
Heh, indeed, yay for WPT :-) I updated those because those are the only properties that affect the logical -> physical property mapping. I did leave a mozilla/gecko-dev@c6c50bd#diff-2bcfd81b55b37cd491bddf83a0a71842R43 I think those two are the only ones needed for logical properties themselves, though I'm happy to change |
To be clear, the resolution says clearly that the four properties shouldn't be animatable, just two of them weren't blocking my immediate work :P I'm happy to send a patch of the other two, though I guess I'll have the same problem as soon as your WPT changes land. @majido I just filed https://bugzilla.mozilla.org/show_bug.cgi?id=1474317 to update the other two properties, I'm happy to change them as soon as your test changes land (or before if you want, I don't particularly mind :P). |
…atable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] 41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa
…atable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] 41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa
I've been writing the Web Animations wpt and CSS Animations wpt (in progress) for this and I got stuck working out how to test that In a couple of places the spec says,
but I can't find where the mapping involving text-orientation is specified. |
I was also wondering about this. https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation says
but according to CSS Logical the dependency is with the
so the used value shouldn't matter? I tested and neither Firefox nor Chromium considered this to affect the resolution of logical properties when I specified |
Based on Abstract-to-Physical Mappings I don't think |
…atable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#573509}
…atable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] 41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#573509}
Per w3c/csswg-drafts#2751 Bug: 1473779 Reviewed-by: heycam MozReview-Commit-ID: GCG3vJWNPfC
Make it clear that display is not animatable (as opposed to supporting discrete animation.) Clarification discussed for other properties in w3c#2751 (comment) Already tested in WPT web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html
w3c#2751 (comment) direction/writing-mode/unicode-bidi are not animatable
Make it clear that display is not animatable (as opposed to supporting discrete animation.) Clarification discussed for other properties in #2751 (comment) Already tested in WPT web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html
#2751 (comment) direction/writing-mode/unicode-bidi are not animatable
For information, TTWG discussed yesterday how we change TTML2 to match this resolution and noted that in TTML there are two distinct concepts that we think are not present in CSS, i.e. discrete animation vs continuous animation. Discrete animation means a step change in a property value at a defined point in time, i.e. analogous to "render this new document with these style properties now, in place of what was there before", with a syntactic construct to make that easier than actually providing a whole new chunk of content, which is the Continuous animation means a continually varying change in a property value along a curve with defined begin and end times and an interpolation calculation mode, defined using the We decided to retain the option for discretely animating direction, writing-mode etc and interpreted the resolution made in this issue as relating only to continuous animation, which we already decided to remove from TTML2 for the relevant style attributes. |
@nigelmegitt CSS differentiates between "Animation type: dicrete" and "Animation type: not animatable". See https://drafts.csswg.org/css-transitions/#animatable-types and https://drafts.csswg.org/css-transitions/#animatable-properties The problem was that if you animate direction and writing-mode discretely, then you also need to update the logical-to-physical mapping halfway the animation, which adds complexity. So it was resolved that they don't animate at all. |
Thanks @Loirooriol that's very useful. In the context of TTML, where timed updates to the physical output are the general desired outcome , the incremental increase in complexity caused by discretely animating properties that cause a new logical-to-physical mapping at a predictable time is minimal. |
…/writing modes props not animatable, a=testonly Automatic update from web-platform-tests[web-animation] Make contain/will-change/writing modes props not animatable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#573509} -- wpt-commits: 7f017e863fec0f00ab1eb531b1bc12864d850d06 wpt-pr: 11813
All properties in the spec should clearly describe animation with "Animation type: not animatable" or "Animation type: discrete". The minutes didn't explicitly mention
|
See the earlier comments in this thread, but the reason for considering |
…/writing modes props not animatable, a=testonly Automatic update from web-platform-tests[web-animation] Make contain/will-change/writing modes props not animatable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#573509} -- wpt-commits: 7f017e863fec0f00ab1eb531b1bc12864d850d06 wpt-pr: 11813
@birtles It does affect the mapping: |
…ange non-animatable. r=heycam Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888
…ange non-animatable. r=heycam Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888
…on-animatable. Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888
Per w3c/csswg-drafts#2751 MozReview-Commit-ID: GCG3vJWNPfC UltraBlame original commit: 8e815e6e442be7255528d81891cc70401e3f07ce
Per w3c/csswg-drafts#2751 MozReview-Commit-ID: GCG3vJWNPfC UltraBlame original commit: 8e815e6e442be7255528d81891cc70401e3f07ce
…/writing modes props not animatable, a=testonly Automatic update from web-platform-tests[web-animation] Make contain/will-change/writing modes props not animatable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvpchromium.org> Reviewed-by: Eric Willigers <ericwilligerschromium.org> Cr-Commit-Position: refs/heads/master{#573509} -- wpt-commits: 7f017e863fec0f00ab1eb531b1bc12864d850d06 wpt-pr: 11813 UltraBlame original commit: 531f5352385b287a160bea990a478460c249e523
Per w3c/csswg-drafts#2751 MozReview-Commit-ID: GCG3vJWNPfC UltraBlame original commit: 8e815e6e442be7255528d81891cc70401e3f07ce
…/writing modes props not animatable, a=testonly Automatic update from web-platform-tests[web-animation] Make contain/will-change/writing modes props not animatable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvpchromium.org> Reviewed-by: Eric Willigers <ericwilligerschromium.org> Cr-Commit-Position: refs/heads/master{#573509} -- wpt-commits: 7f017e863fec0f00ab1eb531b1bc12864d850d06 wpt-pr: 11813 UltraBlame original commit: 531f5352385b287a160bea990a478460c249e523
…/writing modes props not animatable, a=testonly Automatic update from web-platform-tests[web-animation] Make contain/will-change/writing modes props not animatable Match the recent CSSWG resolutions: w3c/csswg-drafts#2737 (comment) w3c/csswg-drafts#2751 (comment) Make following properties none animatable: * contain * direction * display * text-orientation * unicode-bidi * will-change * writing-mode Note that wpt tests have already been updated for direction and writing-mode here [1] [1] web-platform-tests/wpt@41f4ab6 Bug: 860359 Change-Id: I3e7296e3c28ff494eddbc6f011621dd29ba7d2aa Reviewed-on: https://chromium-review.googlesource.com/1127062 Commit-Queue: Majid Valipour <majidvpchromium.org> Reviewed-by: Eric Willigers <ericwilligerschromium.org> Cr-Commit-Position: refs/heads/master{#573509} -- wpt-commits: 7f017e863fec0f00ab1eb531b1bc12864d850d06 wpt-pr: 11813 UltraBlame original commit: 531f5352385b287a160bea990a478460c249e523
…ange non-animatable. r=heycam Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888 UltraBlame original commit: 4bb2acbf4eb0d386046945e52bdd546fc41ae8e5
…ange non-animatable. r=heycam Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888 UltraBlame original commit: 4bb2acbf4eb0d386046945e52bdd546fc41ae8e5
…ange non-animatable. r=heycam Per recent CSSWG resolutions: w3c/csswg-drafts#2737 w3c/csswg-drafts#2751 Differential Revision: https://phabricator.services.mozilla.com/D3888 UltraBlame original commit: 4bb2acbf4eb0d386046945e52bdd546fc41ae8e5
I don't see why this shouldn't be possible:
I expect it to animate just like if I used
width
. But the spec saysOn Chrome it's effectively discrete, on Firefox it doesn't animate at all. https://jsfiddle.net/45e6okrm/
The text was updated successfully, but these errors were encountered: