More properties
This commit is contained in:
@@ -2,6 +2,7 @@ package nl.astraeus.css.style
|
||||
|
||||
import nl.astraeus.css.properties.*
|
||||
import nl.astraeus.logging.log
|
||||
import kotlin.time.Duration
|
||||
|
||||
typealias Css = Style.() -> Unit
|
||||
|
||||
@@ -364,6 +365,34 @@ open class Style(
|
||||
fun all(all: All) { properties["all"] = toProp(all) }
|
||||
fun alignSelf(alignSelf: AlignSelf) { properties["align-self"] = toProp(alignSelf) }
|
||||
fun animation(text: String) { properties["animation"] = listOf(CssProperty(text)) }
|
||||
fun animationDelay(delay: DelayDuration) { properties["animation-delay"] = listOf(delay) }
|
||||
fun animationDirection(direction: AnimationDirection) { properties["animation-direction"] = listOf(direction) }
|
||||
fun animationDuration(duration: DelayDuration) { properties["animation-duration"] = listOf(duration) }
|
||||
fun animationFillMode(fillMode: AnimationFillMode) { properties["animation-fill-mode"] = listOf(fillMode) }
|
||||
fun animationIterationMode(vararg iterationMode: Count) { properties["animation-iteration-mode"] = iterationMode.toList() }
|
||||
fun animationFrame(frame: AnimationFrame) { properties["animation-frame"] = listOf(frame) }
|
||||
fun animationName(vararg name: String) { properties["animation-name"] = name.toList().map { an -> CssProperty(an) } }
|
||||
fun animationPlayState(vararg state : AnimationPlayState) {
|
||||
properties["animation-play-state"] = state.toList()
|
||||
}
|
||||
fun animationTimingFunction(vararg timingFunction: AnimationTimingFunction) {
|
||||
properties["animation-timing-function"] = timingFunction.toList()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
"animation-delay" to animationDelay,
|
||||
"animation-direction" to animationDirection,
|
||||
"animation-duration" to animationDuration,
|
||||
"animation-fill-mode" to animationFillMode,
|
||||
"animation-iteration-count" to animationIterationCount,
|
||||
"animation-frame" to animationFrame,
|
||||
"animation-name" to animationName,
|
||||
"animation-play-state" to animationPlayState,
|
||||
"animation-timing-function" to animationTimingFunction,
|
||||
*/
|
||||
fun color(color: Color) { properties["color"] = listOf(color) }
|
||||
fun backgroundColor(color: Color) { properties["background-color"] = listOf(color) }
|
||||
fun borderRadius(radius: Measurement) { properties["border-radius"] = listOf(radius) }
|
||||
fun borderRadius(
|
||||
|
||||
Reference in New Issue
Block a user