Reformat code

This commit is contained in:
2021-05-11 17:26:08 +02:00
parent 2b725f6af2
commit c5ba12032d
72 changed files with 2501 additions and 1711 deletions

View File

@@ -1,62 +1,62 @@
package nl.astraeus.css.properties
class Image(
value: String
value: String
) : CssProperty(value) {
companion object {
val none = Image("none")
val initial = Image("initial")
val inherit = Image("inherit")
companion object {
val none = Image("none")
val initial = Image("initial")
val inherit = Image("inherit")
fun url(url: String) = Image("url($url)")
}
fun url(url: String) = Image("url($url)")
}
}
class ImageRepeat(
value: String
value: String
) : CssProperty(value) {
companion object {
val repeat = ImageRepeat("repeat")
val round = ImageRepeat("round")
val initial = ImageRepeat("initial")
val inherit = ImageRepeat("inherit")
companion object {
val repeat = ImageRepeat("repeat")
val round = ImageRepeat("round")
val initial = ImageRepeat("initial")
val inherit = ImageRepeat("inherit")
fun stretch(url: String) = ImageRepeat("stretch")
}
fun stretch(url: String) = ImageRepeat("stretch")
}
}
class ImageSlice(
value: String
value: String
) : CssProperty(value) {
companion object {
val repeat = ImageSlice("repeat")
val fill = ImageSlice("fill")
val initial = ImageSlice("initial")
val inherit = ImageSlice("inherit")
companion object {
val repeat = ImageSlice("repeat")
val fill = ImageSlice("fill")
val initial = ImageSlice("initial")
val inherit = ImageSlice("inherit")
fun nr(nr: Int) = ImageSlice("$nr")
fun perc(perc: Int) = ImageSlice("$perc%")
fun perc(perc: Double) = ImageSlice("$perc%")
fun stretch(url: String) = ImageSlice("stretch")
}
fun nr(nr: Int) = ImageSlice("$nr")
fun perc(perc: Int) = ImageSlice("$perc%")
fun perc(perc: Double) = ImageSlice("$perc%")
fun stretch(url: String) = ImageSlice("stretch")
}
}
class ImageSource(
value: String
value: String
) : CssProperty(value) {
companion object {
val none = ImageSource("none")
val initial = ImageSource("initial")
val inherit = ImageSource("inherit")
companion object {
val none = ImageSource("none")
val initial = ImageSource("initial")
val inherit = ImageSource("inherit")
fun text(txt: String) = ImageSource(txt)
fun image(url: String) = ImageSource("'$url'")
}
fun text(txt: String) = ImageSource(txt)
fun image(url: String) = ImageSource("'$url'")
}
}