diff --git a/web/core/src/jsMain/kotlin/androidx/compose/web/css/BrowserAPI.kt b/web/core/src/jsMain/kotlin/androidx/compose/web/css/BrowserAPI.kt index 2ba67589af..325dd02f41 100644 --- a/web/core/src/jsMain/kotlin/androidx/compose/web/css/BrowserAPI.kt +++ b/web/core/src/jsMain/kotlin/androidx/compose/web/css/BrowserAPI.kt @@ -6,30 +6,6 @@ @file:Suppress("UNUSED", "NOTHING_TO_INLINE", "FunctionName") package org.jetbrains.compose.web.css -import org.w3c.dom.css.* -import org.w3c.dom.css.StyleSheet - -inline val StyleSheet.cssRules - get() = this.asDynamic().cssRules.unsafeCast() - - -inline fun StyleSheet.deleteRule(index: Int) { - this.asDynamic().deleteRule(index) -} - -fun StyleSheet.insertRule(cssRule: String, index: Int? = null): Int { - return if (index != null) { - this.asDynamic().insertRule(cssRule, index).unsafeCast() - } else { - this.asDynamic().insertRule(cssRule).unsafeCast() - } -} - - -inline operator fun CSSRuleList.get(index: Int): CSSRule { - return this.asDynamic()[index].unsafeCast() -} - @Suppress("NOTHING_TO_INLINE") inline fun jsObject(): T = js("({})") diff --git a/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Style.kt b/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Style.kt index 3bccae89e8..afa54b0c1a 100644 --- a/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Style.kt +++ b/web/core/src/jsMain/kotlin/androidx/compose/web/elements/Style.kt @@ -9,6 +9,7 @@ import org.w3c.dom.css.CSSStyleDeclaration import org.w3c.dom.css.CSSStyleRule import org.w3c.dom.css.StyleSheet import org.jetbrains.compose.web.css.* +import org.w3c.dom.css.CSSStyleSheet /** * Use this function to mount the