CssBuilder

A builder of CSS declarations (property-value pairs), with null-safe insertion.

Supports two output formats:

  • build produces a single-line inline style (e.g. for the style HTML attribute).

  • buildBlock produces an indented, multi-line block (e.g. for a stylesheet rule body).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun build(): <Error class: unknown class>
Link copied to clipboard
fun buildBlock(indent: String = " "): <Error class: unknown class>
Link copied to clipboard
infix fun String.importantValue(value: RenderRepresentable?): <Error class: unknown class>
infix fun String.importantValue(value: String?): <Error class: unknown class>

Like value, but appends !important to the declaration.

Link copied to clipboard
infix fun String.value(value: RenderRepresentable?): <Error class: unknown class>
infix fun String.value(value: String?): <Error class: unknown class>

Shorthand syntactic sugar for entry.