CSS on javaFX

Stephen Winnall steve at winnall.ch
Sun Apr 15 06:15:29 PDT 2012

On 14 Apr 2012, at 02:20, Pedro Duque Vieira wrote:
> CSS isn't even a language it lacks lots of common language constructs.

That depends on what you understand as a "language".

I would agree that CSS is not a programming language, but it is not intended to be. Nor is XML for that matter. Both CSS and XML are data description languages and - as such - capture the state of the described data at the point where the CSS or XML is loaded (by Scene.getStylesheets.add() or FXMLLoader.load() etc).

The provision of "common language constructs" is what scripting languages provide. We have enough of those already without adding scripting constructs to CSS and XML. In the context of JavaFX, it may make more sense to use Java itself.

I agree that Zonski's proposal is interesting. In the XML world there is data binding, which allows you to create mapping from XML schemas to Java Beans. Something similar for CSS would be very useful.


More information about the openjfx-dev mailing list