On Fri, 24 May 2024 10:15:37 GMT, drmarmac <d...@openjdk.org> wrote:

> * Attempting to do background-color transitions doesn't work, I presume 
> because it's not yet `Interpolatable` in this PR. Do we need to emit a 
> warning in such a case? Right now the `transition` CSS code just seems to be 
> ignored.

CSS transitions work with styleable properties that are either primitives or 
`Interpolatable` objects. So if you apply a transition to the sub-property 
`-fx-background-color`, what really happens is that the CSS subsystem creates a 
new `Background` instance and applies it to the `Region.background` property. 
However, since `Background` is not interpolatable, you won't see an animation. 
This will start to work once all relevant classes are interpolatable, which 
will come with a subsequent PR.

I'm not sure if we really need a warning. The unexpected non-animation is 
really only due to a few missing interpolatable classes, which will be fixed 
soon.

> * Same with the current limitation of not being able to mix shorthand and 
> longhand notations, do we need a warning if it is attempted?

This is out of scope for this PR, since the problem is not unique to the CSS 
`transition` property. We should improve the CSS parser to handle 
shorthand/longhand notations uniformly.

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

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

Reply via email to