|
|
@ -5,6 +5,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.jetbrains.compose.web.core.tests.css |
|
|
|
package org.jetbrains.compose.web.core.tests.css |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import kotlinx.browser.window |
|
|
|
import org.jetbrains.compose.web.core.tests.runTest |
|
|
|
import org.jetbrains.compose.web.core.tests.runTest |
|
|
|
import org.jetbrains.compose.web.css.* |
|
|
|
import org.jetbrains.compose.web.css.* |
|
|
|
import org.jetbrains.compose.web.dom.Div |
|
|
|
import org.jetbrains.compose.web.dom.Div |
|
|
@ -23,13 +24,21 @@ class CSSBorderTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
assertEquals("1px solid red", (root.children[0] as HTMLElement).style.border) |
|
|
|
assertEquals("1px solid red", (root.children[0] as HTMLElement).style.border) |
|
|
|
root.children[1]?.let { |
|
|
|
(root.children[1] as HTMLElement).let { el -> |
|
|
|
val el = it.unsafeCast<HTMLElement>() |
|
|
|
|
|
|
|
assertEquals("green", el.style.getPropertyValue("border-color")) |
|
|
|
assertEquals("green", el.style.getPropertyValue("border-color")) |
|
|
|
assertEquals("3px", el.style.getPropertyValue("border-width")) |
|
|
|
assertEquals("3px", el.style.getPropertyValue("border-width")) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
fun borderThreeValues() = runTest { |
|
|
|
|
|
|
|
composition { |
|
|
|
|
|
|
|
Div({ style { border(3.px, LineStyle.Dotted, Color("green")) } }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals("3px dotted green", (root.children[0] as HTMLElement).style.border) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
fun borderRadius() = runTest { |
|
|
|
fun borderRadius() = runTest { |
|
|
|
composition { |
|
|
|
composition { |
|
|
|