How to set -fx-max-width to USE_PREF_SIZE in JavaFX css?
问题 Im writing a JavaFX-8 application and was wondering if it's possible to set min- or max-width of (e.g.) a Button to USE_PREF_SIZE by css. The class Region defines USE_PREF_SIZE as Double.NEGATIVE_INFINITY , but how to set negative Infinity in css? The JavaFX Reference Guide defines -fx-min-width, -fx-pref-width, -fx-max-width as <number> and a <number> is defined with the following regex [+|-]? [[0-9]+|[0-9]*"."[0-9]+] So maybe it is impossible? I have tried (for fun) to assign the java way