Browse Source

FIX for arithmetic operations

CSS_CASTS
Shagen Ogandzhanian 3 years ago
parent
commit
5b5c4ea53b
  1. 2
      web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleBuilder.kt

2
web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleBuilder.kt

@ -53,7 +53,7 @@ interface CSSVariables
class CSSVariable<out TValue: StylePropertyValue>(val name: String) class CSSVariable<out TValue: StylePropertyValue>(val name: String)
private inline fun <TValue : StylePropertyValue?> variableValue(variableName: String, fallback: TValue? = null) = private inline fun <TValue : StylePropertyValue?> variableValue(variableName: String, fallback: TValue? = null) =
"var(--$variableName${fallback?.let { ", $it" } ?: ""})" "var(--$variableName${fallback?.let { ", $it" } ?: ""})".unsafeCast<TValue>()
fun <TValue: StylePropertyValue> CSSVariable<TValue>.value(fallback: TValue? = null) = fun <TValue: StylePropertyValue> CSSVariable<TValue>.value(fallback: TValue? = null) =
variableValue( variableValue(

Loading…
Cancel
Save