From 1e6c3d0449ffc49e8da8526658a85492356f0287 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Sun, 6 Jun 2021 14:47:26 +0200 Subject: [PATCH] CSS Unit classes are value classes --- .../kotlin/androidx/compose/web/css/CSS.kt | 90 +++++++++---------- .../androidx/compose/web/css/CSSUnits.kt | 66 +++++++------- web/core/src/jsTest/kotlin/CSSUnitApiTests.kt | 38 -------- 3 files changed, 78 insertions(+), 116 deletions(-) diff --git a/web/core/src/jsMain/kotlin/androidx/compose/web/css/CSS.kt b/web/core/src/jsMain/kotlin/androidx/compose/web/css/CSS.kt index be350d3c22..9902fb71c1 100644 --- a/web/core/src/jsMain/kotlin/androidx/compose/web/css/CSS.kt +++ b/web/core/src/jsMain/kotlin/androidx/compose/web/css/CSS.kt @@ -343,51 +343,51 @@ external class StylePropertyMap : StylePropertyMapReadOnly { inline fun Element.computedStyleMap(): StylePropertyMapReadOnly = this.asDynamic().computedStyleMap().unsafeCast() -external class CSS { - companion object { - fun number(value: Number): CSSUnitValue - fun percent(value: Number): CSSpercentValue - - // - fun em(value: Number): CSSemValue - fun ex(value: Number): CSSexValue - fun ch(value: Number): CSSchValue - fun rem(value: Number): CSSremValue - fun vw(value: Number): CSSvwValue - fun vh(value: Number): CSSvhValue - fun vmin(value: Number): CSSvminValue - fun vmax(value: Number): CSSvmaxValue - fun cm(value: Number): CSScmValue - fun mm(value: Number): CSSmmValue - fun Q(value: Number): CSSQValue - - fun pt(value: Number): CSSptValue - fun pc(value: Number): CSSpcValue - fun px(value: Number): CSSpxValue - - // - fun deg(value: Number): CSSdegValue - fun grad(value: Number): CSSgradValue - fun rad(value: Number): CSSradValue - fun turn(value: Number): CSSturnValue - - //