RFR: 8311895: CSS Transitions [v17]
Michael Strauß
mstrauss at openjdk.org
Sat May 25 20:52:13 UTC 2024
On Sat, 25 May 2024 19:28:56 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 57 commits:
>>
>> - Merge branch 'refs/heads/master' into feature/css-transitions
>> - extract magic string to named constant
>> - use existing property in test
>> - fixed documentation
>> - Merge branch 'master' into feature/css-transitions
>> - update 'since' tags
>> - Fix javadoc error
>> - Change javadoc comment
>> - Merge branch 'master' into feature/css-transitions
>> - Discard redundant transitions in StyleableProperty impls
>> - ... and 47 more: https://git.openjdk.org/jfx/compare/94aa2b68...a43dee30
>
> modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html line 688:
>
>> 686: <h3><a id="introtransitions">Transitions</a></h3>
>> 687: <p>JavaFX supports <em>implicit transitions</em> for properties that are styled by CSS. When a property value is
>> 688: changed, it smoothly transitions to the new value over a period of time. Implicit transitions are supported
>
> Maybe not so smoothly when using a step interpolator?
I've changed the wording a bit.
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/TransitionDefinition.java line 40:
>
>> 38: * @param duration duration of the transition
>> 39: * @param delay delay after which the transition is started; if negative, the transition starts
>> 40: * immediately, but will appear to have begun at an earlier point in time
>
> Why accept a negative delay? An [`Animation`](https://openjfx.io/javadoc/22/javafx.graphics/javafx/animation/Animation.html#getDelay()) doesn't accept it.
The W3C specification for the [transition-delay](https://www.w3.org/TR/css-transitions-1/#transition-delay-property) property mandates it, and this PR is a complete implementation of the specification. You're right that `Animation` doesn't support negative delays, but at least for implicit transitions, negative delays have some utility.
Maye we can revisit the choice to disallow negative delays for `Animation` later.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/870#discussion_r1614870557
PR Review Comment: https://git.openjdk.org/jfx/pull/870#discussion_r1614870213
More information about the openjfx-dev
mailing list