Browse Source

Introduce html/css color constants

This resolve #890: Introduce complete list of HTML color aliases
pull/889/head
Shagen Ogandzhanian 3 years ago
parent
commit
27e4dd4fe6
  1. 2
      web/benchmark-core/src/jsMain/kotlin/com/sample/content/CodeSamplesSwitcher.kt
  2. 2
      web/benchmark-core/src/jsMain/kotlin/com/sample/content/CodeSnippets.kt
  3. 2
      web/benchmark-core/src/jsMain/kotlin/com/sample/style/WtText.kt
  4. 147
      web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/Color.kt
  5. 302
      web/core/src/jsTest/kotlin/css/ColorTests.kt

2
web/benchmark-core/src/jsMain/kotlin/com/sample/content/CodeSamplesSwitcher.kt

@ -34,7 +34,7 @@ object SwitcherStylesheet : StyleSheet(AppStylesheet) {
border { border {
style(LineStyle.Solid) style(LineStyle.Solid)
width(3.px) width(3.px)
color(Color("transparent")) color(Color.transparent)
borderRadius(20.px, 20.px, 20.px) borderRadius(20.px, 20.px, 20.px)
} }
color("#aaa") color("#aaa")

2
web/benchmark-core/src/jsMain/kotlin/com/sample/content/CodeSnippets.kt

@ -263,7 +263,7 @@ fun FormattedCodeSnippet(code: String, language: String = "kotlin") {
property("font-family", "'JetBrains Mono', monospace") property("font-family", "'JetBrains Mono', monospace")
property("tab-size", 4) property("tab-size", 4)
fontSize(10.pt) fontSize(10.pt)
backgroundColor(Color("transparent")) backgroundColor(Color.transparent)
} }
} }
) { ) {

2
web/benchmark-core/src/jsMain/kotlin/com/sample/style/WtText.kt

@ -180,7 +180,7 @@ object WtTexts : StyleSheet(AppStylesheet) {
display(DisplayStyle.LegacyInlineFlex) display(DisplayStyle.LegacyInlineFlex)
justifyContent(JustifyContent.Center) justifyContent(JustifyContent.Center)
alignItems(AlignItems.Center) alignItems(AlignItems.Center)
backgroundColor(Color("transparent")) backgroundColor(Color.transparent)
border(0.px) border(0.px)
property("outline", "none") property("outline", "none")

147
web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/Color.kt

@ -5,10 +5,6 @@ package org.jetbrains.compose.web.css
external interface CSSColorValue : StylePropertyValue, CSSVariableValueAs<CSSColorValue> external interface CSSColorValue : StylePropertyValue, CSSVariableValueAs<CSSColorValue>
object Color { object Color {
data class Named(val value: String) : CSSColorValue {
override fun toString(): String = value
}
data class RGB(val r: Number, val g: Number, val b: Number) : CSSColorValue { data class RGB(val r: Number, val g: Number, val b: Number) : CSSColorValue {
override fun toString(): String = "rgb($r, $g, $b)" override fun toString(): String = "rgb($r, $g, $b)"
} }
@ -28,6 +24,147 @@ object Color {
override fun toString(): String = "hsla($h, $s%, $l%, $a)" override fun toString(): String = "hsla($h, $s%, $l%, $a)"
} }
inline val aliceblue get() = Color("aliceblue")
inline val antiquewhite get() = Color("antiquewhite")
inline val aquamarine get() = Color("aquamarine")
inline val azure get() = Color("azure")
inline val beige get() = Color("beige")
inline val bisque get() = Color("bisque")
inline val black get() = Color("black")
inline val blanchedalmond get() = Color("blanchedalmond")
inline val blue get() = Color("blue")
inline val blueviolet get() = Color("blueviolet")
inline val brown get() = Color("brown")
inline val burlywood get() = Color("burlywood")
inline val cadetblue get() = Color("cadetblue")
inline val chartreuse get() = Color("chartreuse")
inline val chocolate get() = Color("chocolate")
inline val cornflowerblue get() = Color("cornflowerblue")
inline val cornsilk get() = Color("cornsilk")
inline val crimson get() = Color("crimson")
inline val cyan get() = Color("cyan")
inline val darkblue get() = Color("darkblue")
inline val darkcyan get() = Color("darkcyan")
inline val darkgoldenrod get() = Color("darkgoldenrod")
inline val darkgray get() = Color("darkgray")
inline val darkgreen get() = Color("darkgreen")
inline val darkkhaki get() = Color("darkkhaki")
inline val darkmagenta get() = Color("darkmagenta")
inline val darkolivegreen get() = Color("darkolivegreen")
inline val darkorange get() = Color("darkorange")
inline val darkorchid get() = Color("darkorchid")
inline val darkred get() = Color("darkred")
inline val darksalmon get() = Color("darksalmon")
inline val darkslateblue get() = Color("darkslateblue")
inline val darkslategray get() = Color("darkslategray")
inline val darkturquoise get() = Color("darkturquoise")
inline val darkviolet get() = Color("darkviolet")
inline val deeppink get() = Color("deeppink")
inline val deepskyblue get() = Color("deepskyblue")
inline val dimgray get() = Color("dimgray")
inline val dodgerblue get() = Color("dodgerblue")
inline val firebrick get() = Color("firebrick")
inline val floralwhite get() = Color("floralwhite")
inline val forestgreen get() = Color("forestgreen")
inline val fuchsia get() = Color("fuchsia")
inline val gainsboro get() = Color("gainsboro")
inline val ghostwhite get() = Color("ghostwhite")
inline val goldenrod get() = Color("goldenrod")
inline val gold get() = Color("gold")
inline val gray get() = Color("gray")
inline val green get() = Color("green")
inline val greenyellow get() = Color("greenyellow")
inline val honeydew get() = Color("honeydew")
inline val hotpink get() = Color("hotpink")
inline val indianred get() = Color("indianred")
inline val indigo get() = Color("indigo")
inline val ivory get() = Color("ivory")
inline val khaki get() = Color("khaki")
inline val lavenderblush get() = Color("lavenderblush")
inline val lavender get() = Color("lavender")
inline val lawngreen get() = Color("lawngreen")
inline val lemonchiffon get() = Color("lemonchiffon")
inline val lightblue get() = Color("lightblue")
inline val lightcoral get() = Color("lightcoral")
inline val lightcyan get() = Color("lightcyan")
inline val lightgoldenrodyellow get() = Color("lightgoldenrodyellow")
inline val lightgray get() = Color("lightgray")
inline val lightgreen get() = Color("lightgreen")
inline val lightpink get() = Color("lightpink")
inline val lightsalmon get() = Color("lightsalmon")
inline val lightseagreen get() = Color("lightseagreen")
inline val lightskyblue get() = Color("lightskyblue")
inline val lightslategray get() = Color("lightslategray")
inline val lightsteelblue get() = Color("lightsteelblue")
inline val lightyellow get() = Color("lightyellow")
inline val limegreen get() = Color("limegreen")
inline val lime get() = Color("lime")
inline val linen get() = Color("linen")
inline val magenta get() = Color("magenta")
inline val maroon get() = Color("maroon")
inline val mediumaquamarine get() = Color("mediumaquamarine")
inline val mediumblue get() = Color("mediumblue")
inline val mediumorchid get() = Color("mediumorchid")
inline val mediumpurple get() = Color("mediumpurple")
inline val mediumseagreen get() = Color("mediumseagreen")
inline val mediumslateblue get() = Color("mediumslateblue")
inline val mediumspringgreen get() = Color("mediumspringgreen")
inline val mediumturquoise get() = Color("mediumturquoise")
inline val mediumvioletred get() = Color("mediumvioletred")
inline val midnightblue get() = Color("midnightblue")
inline val mintcream get() = Color("mintcream")
inline val mistyrose get() = Color("mistyrose")
inline val moccasin get() = Color("moccasin")
inline val navajowhite get() = Color("navajowhite")
inline val navi get() = Color("navi")
inline val oldlace get() = Color("oldlace")
inline val olivedrab get() = Color("olivedrab")
inline val olive get() = Color("olive")
inline val orange get() = Color("orange")
inline val orangered get() = Color("orangered")
inline val orchid get() = Color("orchid")
inline val palegoldenrod get() = Color("palegoldenrod")
inline val palegreen get() = Color("palegreen")
inline val paleturquoise get() = Color("paleturquoise")
inline val palevioletred get() = Color("palevioletred")
inline val papayawhip get() = Color("papayawhip")
inline val peachpuff get() = Color("peachpuff")
inline val peru get() = Color("peru")
inline val pink get() = Color("pink")
inline val plum get() = Color("plum")
inline val powderblue get() = Color("powderblue")
inline val purple get() = Color("purple")
inline val rebeccapurple get() = Color("rebeccapurple")
inline val red get() = Color("red")
inline val rosybrown get() = Color("rosybrown")
inline val royalblue get() = Color("royalblue")
inline val saddlebrown get() = Color("saddlebrown")
inline val salmon get() = Color("salmon")
inline val sandybrown get() = Color("sandybrown")
inline val seagreen get() = Color("seagreen")
inline val seashell get() = Color("seashell")
inline val sienna get() = Color("sienna")
inline val silver get() = Color("silver")
inline val skyblue get() = Color("skyblue")
inline val slateblue get() = Color("slateblue")
inline val slategray get() = Color("slategray")
inline val snow get() = Color("snow")
inline val springgreen get() = Color("springgreen")
inline val steelblue get() = Color("steelblue")
inline val teal get() = Color("teal")
inline val thistle get() = Color("thistle")
inline val tomato get() = Color("tomato")
inline val turquoise get() = Color("turquoise")
inline val violet get() = Color("violet")
inline val wheat get() = Color("wheat")
inline val white get() = Color("white")
inline val whitesmoke get() = Color("whitesmoke")
inline val yellowgreen get() = Color("yellowgreen")
inline val yellow get() = Color("yellow")
inline val transparent get() = Color("transparent")
inline val currentColor get() = Color("currentColor")
} }
fun Color(name: String): CSSColorValue = Color.Named(name) fun Color(name: String): CSSColorValue = name.unsafeCast<CSSColorValue>()

302
web/core/src/jsTest/kotlin/css/ColorTests.kt

@ -0,0 +1,302 @@
/*
* Copyright 2020-2021 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/
package org.jetbrains.compose.web.core.tests.css
import org.jetbrains.compose.web.core.tests.runTest
import org.jetbrains.compose.web.css.Color
import org.jetbrains.compose.web.css.color
import org.jetbrains.compose.web.dom.Div
import org.w3c.dom.HTMLElement
import org.w3c.dom.get
import kotlin.test.Test
import kotlin.test.assertEquals
class ColorTests {
@Test
fun colorConstants() = runTest {
composition {
Div({ style { color(Color.aliceblue) } })
Div({ style { color(Color.antiquewhite) } })
Div({ style { color(Color.aquamarine) } })
Div({ style { color(Color.azure) } })
Div({ style { color(Color.beige) } })
Div({ style { color(Color.bisque) } })
Div({ style { color(Color.black) } })
Div({ style { color(Color.blanchedalmond) } })
Div({ style { color(Color.blue) } })
Div({ style { color(Color.blueviolet) } })
Div({ style { color(Color.brown) } })
Div({ style { color(Color.burlywood) } })
Div({ style { color(Color.cadetblue) } })
Div({ style { color(Color.chartreuse) } })
Div({ style { color(Color.chocolate) } })
Div({ style { color(Color.cornflowerblue) } })
Div({ style { color(Color.cornsilk) } })
Div({ style { color(Color.crimson) } })
Div({ style { color(Color.cyan) } })
Div({ style { color(Color.darkblue) } })
Div({ style { color(Color.darkcyan) } })
Div({ style { color(Color.darkgoldenrod) } })
Div({ style { color(Color.darkgray) } })
Div({ style { color(Color.darkgreen) } })
Div({ style { color(Color.darkkhaki) } })
Div({ style { color(Color.darkmagenta) } })
Div({ style { color(Color.darkolivegreen) } })
Div({ style { color(Color.darkorange) } })
Div({ style { color(Color.darkorchid) } })
Div({ style { color(Color.darkred) } })
Div({ style { color(Color.darksalmon) } })
Div({ style { color(Color.darkslateblue) } })
Div({ style { color(Color.darkslategray) } })
Div({ style { color(Color.darkturquoise) } })
Div({ style { color(Color.darkviolet) } })
Div({ style { color(Color.deeppink) } })
Div({ style { color(Color.deepskyblue) } })
Div({ style { color(Color.dimgray) } })
Div({ style { color(Color.dodgerblue) } })
Div({ style { color(Color.firebrick) } })
Div({ style { color(Color.floralwhite) } })
Div({ style { color(Color.forestgreen) } })
Div({ style { color(Color.fuchsia) } })
Div({ style { color(Color.gainsboro) } })
Div({ style { color(Color.ghostwhite) } })
Div({ style { color(Color.goldenrod) } })
Div({ style { color(Color.gold) } })
Div({ style { color(Color.gray) } })
Div({ style { color(Color.green) } })
Div({ style { color(Color.greenyellow) } })
Div({ style { color(Color.honeydew) } })
Div({ style { color(Color.hotpink) } })
Div({ style { color(Color.indianred) } })
Div({ style { color(Color.indigo) } })
Div({ style { color(Color.ivory) } })
Div({ style { color(Color.khaki) } })
Div({ style { color(Color.lavenderblush) } })
Div({ style { color(Color.lavender) } })
Div({ style { color(Color.lawngreen) } })
Div({ style { color(Color.lemonchiffon) } })
Div({ style { color(Color.lightblue) } })
Div({ style { color(Color.lightcoral) } })
Div({ style { color(Color.lightcyan) } })
Div({ style { color(Color.lightgoldenrodyellow) } })
Div({ style { color(Color.lightgray) } })
Div({ style { color(Color.lightgreen) } })
Div({ style { color(Color.lightpink) } })
Div({ style { color(Color.lightsalmon) } })
Div({ style { color(Color.lightseagreen) } })
Div({ style { color(Color.lightskyblue) } })
Div({ style { color(Color.lightslategray) } })
Div({ style { color(Color.lightsteelblue) } })
Div({ style { color(Color.lightyellow) } })
Div({ style { color(Color.limegreen) } })
Div({ style { color(Color.lime) } })
Div({ style { color(Color.linen) } })
Div({ style { color(Color.magenta) } })
Div({ style { color(Color.maroon) } })
Div({ style { color(Color.mediumaquamarine) } })
Div({ style { color(Color.mediumblue) } })
Div({ style { color(Color.mediumorchid) } })
Div({ style { color(Color.mediumpurple) } })
Div({ style { color(Color.mediumseagreen) } })
Div({ style { color(Color.mediumslateblue) } })
Div({ style { color(Color.mediumspringgreen) } })
Div({ style { color(Color.mediumturquoise) } })
Div({ style { color(Color.mediumvioletred) } })
Div({ style { color(Color.midnightblue) } })
Div({ style { color(Color.mintcream) } })
Div({ style { color(Color.mistyrose) } })
Div({ style { color(Color.moccasin) } })
Div({ style { color(Color.navajowhite) } })
Div({ style { color(Color.oldlace) } })
Div({ style { color(Color.olivedrab) } })
Div({ style { color(Color.olive) } })
Div({ style { color(Color.orange) } })
Div({ style { color(Color.orangered) } })
Div({ style { color(Color.orchid) } })
Div({ style { color(Color.palegoldenrod) } })
Div({ style { color(Color.palegreen) } })
Div({ style { color(Color.paleturquoise) } })
Div({ style { color(Color.palevioletred) } })
Div({ style { color(Color.papayawhip) } })
Div({ style { color(Color.peachpuff) } })
Div({ style { color(Color.peru) } })
Div({ style { color(Color.pink) } })
Div({ style { color(Color.plum) } })
Div({ style { color(Color.powderblue) } })
Div({ style { color(Color.purple) } })
Div({ style { color(Color.rebeccapurple) } })
Div({ style { color(Color.red) } })
Div({ style { color(Color.rosybrown) } })
Div({ style { color(Color.royalblue) } })
Div({ style { color(Color.saddlebrown) } })
Div({ style { color(Color.salmon) } })
Div({ style { color(Color.sandybrown) } })
Div({ style { color(Color.seagreen) } })
Div({ style { color(Color.seashell) } })
Div({ style { color(Color.sienna) } })
Div({ style { color(Color.silver) } })
Div({ style { color(Color.skyblue) } })
Div({ style { color(Color.slateblue) } })
Div({ style { color(Color.slategray) } })
Div({ style { color(Color.snow) } })
Div({ style { color(Color.springgreen) } })
Div({ style { color(Color.steelblue) } })
Div({ style { color(Color.teal) } })
Div({ style { color(Color.thistle) } })
Div({ style { color(Color.tomato) } })
Div({ style { color(Color.turquoise) } })
Div({ style { color(Color.violet) } })
Div({ style { color(Color.wheat) } })
Div({ style { color(Color.white) } })
Div({ style { color(Color.whitesmoke) } })
Div({ style { color(Color.yellowgreen) } })
Div({ style { color(Color.yellow) } })
Div({ style { color(Color.transparent) } })
Div({ style { color(Color.currentColor) } })
}
var counter = 0
assertEquals("aliceblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("antiquewhite", (root.children[counter++] as HTMLElement).style.color)
assertEquals("aquamarine", (root.children[counter++] as HTMLElement).style.color)
assertEquals("azure", (root.children[counter++] as HTMLElement).style.color)
assertEquals("beige", (root.children[counter++] as HTMLElement).style.color)
assertEquals("bisque", (root.children[counter++] as HTMLElement).style.color)
assertEquals("black", (root.children[counter++] as HTMLElement).style.color)
assertEquals("blanchedalmond", (root.children[counter++] as HTMLElement).style.color)
assertEquals("blue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("blueviolet", (root.children[counter++] as HTMLElement).style.color)
assertEquals("brown", (root.children[counter++] as HTMLElement).style.color)
assertEquals("burlywood", (root.children[counter++] as HTMLElement).style.color)
assertEquals("cadetblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("chartreuse", (root.children[counter++] as HTMLElement).style.color)
assertEquals("chocolate", (root.children[counter++] as HTMLElement).style.color)
assertEquals("cornflowerblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("cornsilk", (root.children[counter++] as HTMLElement).style.color)
assertEquals("crimson", (root.children[counter++] as HTMLElement).style.color)
assertEquals("cyan", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkcyan", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkgoldenrod", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkgray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkkhaki", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkmagenta", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkolivegreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkorange", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkorchid", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkred", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darksalmon", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkslateblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkslategray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkturquoise", (root.children[counter++] as HTMLElement).style.color)
assertEquals("darkviolet", (root.children[counter++] as HTMLElement).style.color)
assertEquals("deeppink", (root.children[counter++] as HTMLElement).style.color)
assertEquals("deepskyblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("dimgray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("dodgerblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("firebrick", (root.children[counter++] as HTMLElement).style.color)
assertEquals("floralwhite", (root.children[counter++] as HTMLElement).style.color)
assertEquals("forestgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("fuchsia", (root.children[counter++] as HTMLElement).style.color)
assertEquals("gainsboro", (root.children[counter++] as HTMLElement).style.color)
assertEquals("ghostwhite", (root.children[counter++] as HTMLElement).style.color)
assertEquals("goldenrod", (root.children[counter++] as HTMLElement).style.color)
assertEquals("gold", (root.children[counter++] as HTMLElement).style.color)
assertEquals("gray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("green", (root.children[counter++] as HTMLElement).style.color)
assertEquals("greenyellow", (root.children[counter++] as HTMLElement).style.color)
assertEquals("honeydew", (root.children[counter++] as HTMLElement).style.color)
assertEquals("hotpink", (root.children[counter++] as HTMLElement).style.color)
assertEquals("indianred", (root.children[counter++] as HTMLElement).style.color)
assertEquals("indigo", (root.children[counter++] as HTMLElement).style.color)
assertEquals("ivory", (root.children[counter++] as HTMLElement).style.color)
assertEquals("khaki", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lavenderblush", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lavender", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lawngreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lemonchiffon", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightcoral", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightcyan", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightgoldenrodyellow", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightgray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightpink", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightsalmon", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightseagreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightskyblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightslategray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightsteelblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lightyellow", (root.children[counter++] as HTMLElement).style.color)
assertEquals("limegreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("lime", (root.children[counter++] as HTMLElement).style.color)
assertEquals("linen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("magenta", (root.children[counter++] as HTMLElement).style.color)
assertEquals("maroon", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumaquamarine", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumorchid", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumpurple", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumseagreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumslateblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumspringgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumturquoise", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mediumvioletred", (root.children[counter++] as HTMLElement).style.color)
assertEquals("midnightblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mintcream", (root.children[counter++] as HTMLElement).style.color)
assertEquals("mistyrose", (root.children[counter++] as HTMLElement).style.color)
assertEquals("moccasin", (root.children[counter++] as HTMLElement).style.color)
assertEquals("navajowhite", (root.children[counter++] as HTMLElement).style.color)
assertEquals("oldlace", (root.children[counter++] as HTMLElement).style.color)
assertEquals("olivedrab", (root.children[counter++] as HTMLElement).style.color)
assertEquals("olive", (root.children[counter++] as HTMLElement).style.color)
assertEquals("orange", (root.children[counter++] as HTMLElement).style.color)
assertEquals("orangered", (root.children[counter++] as HTMLElement).style.color)
assertEquals("orchid", (root.children[counter++] as HTMLElement).style.color)
assertEquals("palegoldenrod", (root.children[counter++] as HTMLElement).style.color)
assertEquals("palegreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("paleturquoise", (root.children[counter++] as HTMLElement).style.color)
assertEquals("palevioletred", (root.children[counter++] as HTMLElement).style.color)
assertEquals("papayawhip", (root.children[counter++] as HTMLElement).style.color)
assertEquals("peachpuff", (root.children[counter++] as HTMLElement).style.color)
assertEquals("peru", (root.children[counter++] as HTMLElement).style.color)
assertEquals("pink", (root.children[counter++] as HTMLElement).style.color)
assertEquals("plum", (root.children[counter++] as HTMLElement).style.color)
assertEquals("powderblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("purple", (root.children[counter++] as HTMLElement).style.color)
assertEquals("rebeccapurple", (root.children[counter++] as HTMLElement).style.color)
assertEquals("red", (root.children[counter++] as HTMLElement).style.color)
assertEquals("rosybrown", (root.children[counter++] as HTMLElement).style.color)
assertEquals("royalblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("saddlebrown", (root.children[counter++] as HTMLElement).style.color)
assertEquals("salmon", (root.children[counter++] as HTMLElement).style.color)
assertEquals("sandybrown", (root.children[counter++] as HTMLElement).style.color)
assertEquals("seagreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("seashell", (root.children[counter++] as HTMLElement).style.color)
assertEquals("sienna", (root.children[counter++] as HTMLElement).style.color)
assertEquals("silver", (root.children[counter++] as HTMLElement).style.color)
assertEquals("skyblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("slateblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("slategray", (root.children[counter++] as HTMLElement).style.color)
assertEquals("snow", (root.children[counter++] as HTMLElement).style.color)
assertEquals("springgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("steelblue", (root.children[counter++] as HTMLElement).style.color)
assertEquals("teal", (root.children[counter++] as HTMLElement).style.color)
assertEquals("thistle", (root.children[counter++] as HTMLElement).style.color)
assertEquals("tomato", (root.children[counter++] as HTMLElement).style.color)
assertEquals("turquoise", (root.children[counter++] as HTMLElement).style.color)
assertEquals("violet", (root.children[counter++] as HTMLElement).style.color)
assertEquals("wheat", (root.children[counter++] as HTMLElement).style.color)
assertEquals("white", (root.children[counter++] as HTMLElement).style.color)
assertEquals("whitesmoke", (root.children[counter++] as HTMLElement).style.color)
assertEquals("yellowgreen", (root.children[counter++] as HTMLElement).style.color)
assertEquals("yellow", (root.children[counter++] as HTMLElement).style.color)
assertEquals("transparent", (root.children[counter++] as HTMLElement).style.color)
assertEquals("currentcolor", (root.children[counter++] as HTMLElement).style.color)
}
}
Loading…
Cancel
Save