[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8311895: CSS Transitions
From:       leewyatt <duke () openjdk ! org>
Date:       2023-07-26 14:41:50
Message-ID: MvdKRdz8sQbLLTIRjZfVcb1y8anwfAk5jb10zTF1Lp8=.a80e775b-5fcc-4269-a275-1355370d5f3d () github ! com
[Download RAW message or body]

On Tue, 16 Aug 2022 03:01:23 GMT, Michael Strauß <mstrauss@openjdk.org> wrote:

> 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.

Wow, replacing some Java code with CSS can make the Java code more focused on \
business logic, making it much cleaner.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/870#issuecomment-1651945492


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic