diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/properties/transform.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/properties/transform.kt index df84b323fa..5267b0eda1 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/properties/transform.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/properties/transform.kt @@ -30,6 +30,7 @@ fun rotateZ(a: CSSAngleValue) = TransformFunction { "rotateZ($a)" } fun scaleTransform(sx: Number) = TransformFunction { "scale($sx)" } fun scaleTransform(sx: Number, sy: Number) = TransformFunction { "scale($sx, $sy)" } +fun scale3dTransform(sx: Number, sy: Number, sz: Number) = TransformFunction { "scale3d($sx, $sy, $sz)" } fun StyleBuilder.transform(transformFunction: TransformFunction) { property("transform", transformFunction.apply()) diff --git a/web/core/src/jsTest/kotlin/css/TransformTests.kt b/web/core/src/jsTest/kotlin/css/TransformTests.kt index 19a3bdf1b7..a9a7593f6d 100644 --- a/web/core/src/jsTest/kotlin/css/TransformTests.kt +++ b/web/core/src/jsTest/kotlin/css/TransformTests.kt @@ -107,4 +107,14 @@ class TransformTests { assertEquals("scale(0.2, 0.3)", nextChild().style.transform) } + @Test + fun scale3d() = runTest { + composition { + Div({ style { transform(scale3dTransform(0.2, 0.3, 0.1)) } }) + } + + assertEquals("scale3d(0.2, 0.3, 0.1)", nextChild().style.transform) + } + + } \ No newline at end of file