staticStyle

fun staticStyle(css: String)

adds some static css to your app's dynamic style sheet.

This function is mainly intended for internal use; use style whenever possible! Calling this function multiple times with identical styles will cause css-errors to be raised. Also make sure not to reference values from the Theme in the style passed to this function. They will not be updated when the Theme changes (hence 'static').

Parameters

css

well formed content of the css-rule to add

fun staticStyle(name: String, css: String): StyleClass

adds a static css-class to your app's dynamic style sheet.

This function is mainly intended for internal use; use style whenever possible! Calling this function multiple times with identical styles will cause css-errors to be raised. Also make sure not to reference values from the Theme in the style passed to this function. They will not be updated when the Theme changes (hence 'static').

Return

the name of the created class

Parameters

css

well formed content of the css-rule to add

name

of the class to create

fun staticStyle(name: String, styling: BoxParams.() -> Unit): StyleClass

adds a static css-class to your app's dynamic style sheet.

This function is mainly intended for internal use; use style whenever possible! Calling this function multiple times with identical styles will cause css-errors to be raised. Also make sure not to reference values from the Theme in the style passed to this function. They will not be updated when the Theme changes (hence 'static').

Return

the name of the created class

Parameters

name

of the class to create

styling

styling DSL expression