@ -61,6 +61,6 @@ fun translateYTransform(ty: CSSPercentageValue) = TransformFunction { "translate
fun translateZTransform(tz: CSSLengthValue) = TransformFunction { "translateZ($tz)" }
fun StyleBuilder.transform(transformFunction: TransformFunction) {
property("transform", transformFunction.apply())
fun StyleBuilder.transform(vararg transformFunction: TransformFunction) {
property("transform", transformFunction.joinToString(" ") { it.apply() })
}
@ -237,4 +237,13 @@ class TransformTests {
assertEquals("translateZ(7px)", nextChild().style.transform)
@Test
fun mutlipleTransforms() = runTest {
composition {
Div({ style { transform(perspectiveTransform(3.cm), translate(10.px, 3.px), rotateYTransform(3.deg)) } })
assertEquals("perspective(3cm) translate(10px, 3px) rotateY(3deg)", nextChild().style.transform)