style

fun Element.style(function: StyleSheet.() -> Unit): StyleSheet(source)

Applies the provided styling function to the element's stylesheet. If the element does not already have a stylesheet, a new one is created and the function is applied to it.

Return

The updated or newly created stylesheet associated with the element.

Parameters

function

A lambda function defining the style rules to be applied to the element's stylesheet.