Repository: JetBrains/compose-multiplatform
File: html/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleScope.kt (Kotlin)

Code before:
    internal fun copyFrom(sb: StyleHolder) {
        properties.addAll(sb.properties)
        variables.addAll(sb.variables)
    }
}

data class StylePropertyDeclaration(
    val name: String,
    val value: StylePropertyValue,
    val important: Boolean = false,
) {
    constructor(name: String, value: String, important: Boolean = false) : this(name, value.unsafeCast<StylePropertyValue>(), important)
    constructor(name: String, value: Number, important: Boolean = false) : this(name, value.unsafeCast<StylePropertyValue>(), important)
}
typealias StylePropertyList = List<StylePropertyDeclaration>
typealias MutableStylePropertyList = MutableList<StylePropertyDeclaration>

internal fun StylePropertyList.nativeEquals(properties: StylePropertyList): Boolean {
    if (this.size != properties.size) return false

    var index = 0
    return all { prop ->
        val otherProp = properties[index++]
        prop.name == otherProp.name &&
            prop.value.toString() == otherProp.value.toString() &&
                prop.important == otherProp.important
    }
}


Review comment (suggestion):
```suggestion
            prop.important == otherProp.important && prop.value.toString() == otherProp.value.toString()
                
```

changing the order of the checks can help a bit - it's better to compare the booleans first. 

Code after:

    override fun property(propertyName: String, value: StylePropertyValue, important: Boolean) {
        properties.add(StylePropertyDeclaration(propertyName, value, important))
    }

    override fun property(propertyName: String, value: StylePropertyValue) {
        property(propertyName = propertyName, value = value, important = false)
    }

    override fun variable(variableName: String, value: StylePropertyValue) {
        variables.add(StylePropertyDeclaration(variableName, value))
    }

    // StylePropertyValue is js native object without equals
    override fun equals(other: Any?): Boolean {
        return if (other is StyleHolder) {
            properties.nativeEquals(other.properties) &&
                variables.nativeEquals(other.variables)
        } else false
    }

    @ComposeWebInternalApi
    internal fun copyFrom(sb: StyleHolder) {
        properties.addAll(sb.properties)
        variables.addAll(sb.variables)
    }
}

data class StylePropertyDeclaration(
    val name: String,
    val value: StylePropertyValue,
    val important: Boolean,
) {
    constructor(name: String, value: StylePropertyValue) : this(name, value, false)

    constructor(name: String, value: String, important: Boolean) : this(name, value.unsafeCast<StylePropertyValue>(), important)
    constructor(name: String, value: String) : this(name, value, false)

    constructor(name: String, value: Number, important: Boolean) : this(name, value.unsafeCast<StylePropertyValue>(), important)
    constructor(name: String, value: Number) : this(name, value, false)
}
typealias StylePropertyList = List<StylePropertyDeclaration>
typealias MutableStylePropertyList = MutableList<StylePropertyDeclaration>

internal fun StylePropertyList.nativeEquals(properties: StylePropertyList): Boolean {
    if (this.size != properties.size) return false

    var index = 0
    return all { prop ->
        val otherProp = properties[index++]
        prop.name == otherProp.name &&