More properties, cleanup

This commit is contained in:
2020-02-28 19:47:14 +01:00
parent b92b16f1b8
commit ba58deeaf5
8 changed files with 224 additions and 4 deletions

View File

@@ -11,3 +11,48 @@ class Image(
fun inherit() = Image("inherit")
}
}
class ImageRepeat(
value: String
) : CssProperty(value) {
companion object {
fun stretch(url: String) = Image("stretch")
fun repeat() = Image("repeat")
fun round() = Image("round")
fun initial() = Image("initial")
fun inherit() = Image("inherit")
}
}
class ImageSlice(
value: String
) : CssProperty(value) {
companion object {
fun nr(nr: Int) = Image("$nr")
fun perc(perc: Int) = Image("$perc%")
fun perc(perc: Double) = Image("$perc%")
fun stretch(url: String) = Image("stretch")
fun repeat() = Image("repeat")
fun fill() = Image("fill")
fun initial() = Image("initial")
fun inherit() = Image("inherit")
}
}
class ImageSource(
value: String
) : CssProperty(value) {
companion object {
fun none() = ImageSource("none")
fun text(txt: String) = ImageSource(txt)
fun image(url: String) = ImageSource("'$url'")
fun initial() = ImageSource("initial")
fun inherit() = ImageSource("inherit")
}
}