RFR: 8311895: CSS Transitions [v16]
Michael Strauß
mstrauss at openjdk.org
Fri May 24 11:43:14 UTC 2024
On Fri, 24 May 2024 10:15:37 GMT, drmarmac <duke at 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
More information about the openjfx-dev
mailing list