RFR: 8311895: CSS Transitions [v16]
Michael Strauß
mstrauss at openjdk.org
Thu May 2 08:40:28 UTC 2024
> Implementation of [CSS Transitions](https://gist.github.com/mstr2/c72f8c9faa87de14926978f517a6018a).
>
> ### Example
>
> .button {
> -fx-background-color: dodgerblue;
> }
>
> .button:hover {
> -fx-background-color: red;
> -fx-scale-x: 1.1;
> -fx-scale-y: 1.1;
>
> transition: -fx-background-color 0.5s ease,
> -fx-scale-x 0.5s ease,
> -fx-scale-y 0.5s ease;
> }
>
> <img src="https://user-images.githubusercontent.com/43553916/184781143-0520fbfe-54bf-4b8d-93ac-834708e46500.gif" width="200"/>
>
> ### Limitations
> This implementation supports both shorthand and longhand notations for the `transition` property. However, due to limitations of JavaFX CSS, mixing both notations doesn't work:
>
> .button {
> transition: -fx-background-color 1s;
> transition-easing-function: linear;
> }
>
> This issue should be addressed in a follow-up enhancement.
Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 53 commits:
- 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
- Changes per review
- Merge branch 'master' into feature/css-transitions
- Merge branch 'master' into feature/css-transitions
- Add TransitionMediator
- ... and 43 more: https://git.openjdk.org/jfx/compare/aa9907a5...6614abb9
-------------
Changes: https://git.openjdk.org/jfx/pull/870/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=870&range=15
Stats: 4673 lines in 43 files changed: 4630 ins; 4 del; 39 mod
Patch: https://git.openjdk.org/jfx/pull/870.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/870/head:pull/870
PR: https://git.openjdk.org/jfx/pull/870
More information about the openjfx-dev
mailing list