style

fun style(css: String, prefix: String = "s"): StyleClass

creates a dynamic css-class and add it to your app's dynamic style sheet. To make the name unique a hash is calculated from your content. This hash is also used to make sure that no two rules with identical content are created but the already existing class is used in this case.

Return

the name of the created class

Parameters

css

well formed content of the css-rule to add

prefix

that is added in front of the created class name

fun style(prefix: String = "s", styling: BoxParams.() -> Unit): StyleClass

creates a dynamic css-class and add it to your app's dynamic style sheet. To make the name unique a hash is calculated from your content. This hash is also used to make sure that no two rules with identical content are created but the already existing class is used in this case.

Return

the name of the created class

Parameters

prefix

that is added in front of the created class name

styling

styling DSL expression