The radial gradient seems to have either both center and radius as absolute or as relative, however the CSS reference guide does not state this.
For example the following should - according to CSS reference - place a red to white radial gradient with radius 8 pixel on the top right corner of a control:
.myStyle{
-fx-background-color: radial-gradient(center 100% 0%, radius 8px, red, white);
}
This does however not work, but places the center to the top left corner. The reason for this is probably that there is a single property for both on the gradient (see http://docs.oracle.com/javafx/2/api/javafx/scene/paint/RadialGradient.html#isProportional%28%29 )
This should be stated clearly on the CSS reference or - even better - it should be possible to create a gradient as described: this seems to be a reasonable use case.
For example the following should - according to CSS reference - place a red to white radial gradient with radius 8 pixel on the top right corner of a control:
.myStyle{
-fx-background-color: radial-gradient(center 100% 0%, radius 8px, red, white);
}
This does however not work, but places the center to the top left corner. The reason for this is probably that there is a single property for both on the gradient (see http://docs.oracle.com/javafx/2/api/javafx/scene/paint/RadialGradient.html#isProportional%28%29 )
This should be stated clearly on the CSS reference or - even better - it should be possible to create a gradient as described: this seems to be a reasonable use case.
- blocks
-
JDK-8117289 CSS: update cssref for 8.0
- Resolved
-
JDK-8116545 CSS: update cssref for 2.2
- Resolved