On Mon, 24 Nov 2025 16:24:58 GMT, Andy Goryachev <[email protected]> wrote:

> Could you provide a complete selector for the example in this PR description 
> please, so I can copy and paste it?

Here it is, for a region with the `rect` style class:


.rect {
  -fx-min-width: 150;
  -fx-min-height: 50;
  -fx-background-color: purple;
  transition-property: -fx-min-width, -fx-background-color;
  transition-duration: 2s;
  transition-timing-function: linear(0, 0.063, 0.25, 0.563, 1 36.4%,
                                     0.812, 0.75, 0.813, 1 72.7%,
                                     0.953, 0.938, 0.953, 1 90.9%,
                                     0.984, 1 100% 100%);
}

.rect:hover {
  -fx-min-width: 400;
  -fx-background-color: green;
}

I've also added this example to tests/manual/graphics/CssTransitionsTest.


> Similarly, do you think it's worth adding the same (complete selector 
> example) to the class javadoc?

No, mainly because the `javafx.animation` package doesn't mention CSS at all, 
so an example for a CSS selector would be misplaced here. I'm also not sure if 
a complex example is useful, simple examples are usually easier to understand 
(and we have three of those).

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

PR Comment: https://git.openjdk.org/jfx/pull/1977#issuecomment-3572473734

Reply via email to