All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.styled.CssBuilder.kt Maven / Gradle / Ivy

There is a newer version: 5.3.11-pre.717
Show newest version
package styled

import kotlinx.css.CssBuilder
import kotlinx.css.properties.*

fun CssBuilder.animation(
    duration: Time = 0.s,
    timing: Timing = Timing.ease,
    delay: Time = 0.s,
    iterationCount: IterationCount = 1.times,
    direction: AnimationDirection = AnimationDirection.normal,
    fillMode: FillMode = FillMode.none,
    playState: PlayState = PlayState.running,
    handler: KeyframesBuilder.() -> Unit,
) = animation(keyframes(indent, handler), duration, timing, delay, iterationCount, direction, fillMode, playState)

inline fun keyframes(indent: String = "", handler: KeyframesBuilder.() -> Unit): String {
    val builder = KeyframesBuilder(indent)
    builder.handler()
    return keyframesName(builder.toString())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy