Package dev.fritz2.styling

Types

StyleClass
Link copied to clipboard
js
inline class StyleClass(name: String)
Alias class for css classes

Functions

resetCss
Link copied to clipboard
js
fun resetCss(css: String)
showDynamicStyle
Link copied to clipboard
js
fun showDynamicStyle(): String
showStaticStyle
Link copied to clipboard
js
fun showStaticStyle(): String
staticStyle
Link copied to clipboard
js
fun staticStyle(css: String)
adds some static css to your app's dynamic style sheet.
fun staticStyle(name: String, styling: BoxParams.() -> Unit): StyleClass
adds a static css-class to your app's dynamic style sheet.
fun staticStyle(name: String, css: String): StyleClass
adds a static css-class to your app's dynamic style sheet.
style
Link copied to clipboard
js
fun style(prefix: String = "s", styling: BoxParams.() -> Unit): StyleClass
creates a dynamic css class and add it to your app's dynamic style sheet.
fun style(css: String, prefix: String = "s"): StyleClass
creates a dynamic css-class and add it to your app's dynamic style sheet.
whenever
Link copied to clipboard
js
fun StyleClass.whenever(condition: Flow<Boolean>): Flow<StyleClass>
applies a given css class only when a condition is fulfilled.
inline fun <T> StyleClass.whenever(value: Flow<T>, crossinline predicate: suspend (T) -> Boolean): Flow<StyleClass>
applies a given css class only when a condition is fulfilled.

Properties

name
Link copied to clipboard
js
val Flow<StyleClass>.name: Flow<String>
use name on a Flow of StyleClass to get the css classname out of it.