Where to get a list of all JavaFX CSS properties names?

3.5k Views Asked by At

I am trying to build a CodeMirror mode file in order to provide correct syntax highlighting and completion help for the JavaFX flavour of CSS, based on the original CSS mode.

In JavaFX CSS, most properties are the same as in classic CSS, but some don't exist, some are different, and ALL properties are prefixed with -fx-

So, for example,

width: 600px;

becomes

-fx-width: 600px;

Where could I obtain a list, in plain text, of all the existing JavaFX CSS properties names, so that I could replace the normal CSS properties name in the JavaScript mode file ?

Note : if such a mode file for CodeMirror already exists, it would be even better, of course. But Google didn't help there.

2

There are 2 best solutions below

0
On BEST ANSWER

The default styles for all javafx css properties are defined (in JavaFX8) in a file called modena.css. I wrote a python script to extract every property listed and write them to a text file, resulting in the following output:

https://wheelercode.wordpress.com/javafx-css-properties-selectors-list/

3
On

The best ressources I know is the JavaFX CSS Reference Guide of Oracle: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html

I am not sure there is everything but the list is pretty long. It is not plain text but you can manage to obtain a plain text list from this document. (In the source code of the webpage all css properties are label with class="propertyname")