More properties, cleanup

This commit is contained in:
2020-03-01 12:54:25 +01:00
parent b80873a85a
commit 6e5c10c089
3 changed files with 49 additions and 2 deletions

View File

@@ -17,8 +17,7 @@ kotlin {
* To find out how to configure the targets, please follow the link:
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets */
jvm()
js {
}
js()
sourceSets {
val commonMain by getting {

View File

@@ -0,0 +1,42 @@
package nl.astraeus.css.properties
class FlexDirection(
value: String
) : CssProperty(value) {
companion object {
fun row() = FlexDirection("row")
fun rowReverse() = FlexDirection("row-reverse")
fun column() = FlexDirection("column")
fun columnReverse() = FlexDirection("column-reverse")
fun initial() = FlexDirection("initial")
fun inherit() = FlexDirection("inherit")
}
}
class FlexGrowShrink(
value: String
) : CssProperty(value) {
companion object {
fun number(number: Int) = FlexDirection("$number")
fun initial() = FlexDirection("initial")
fun inherit() = FlexDirection("inherit")
}
}
class FlexWrap(
value: String
) : CssProperty(value) {
companion object {
fun nowrap() = FlexWrap("nowrap")
fun wrap() = FlexWrap("wrap")
fun wrapReverse() = FlexWrap("wrap-reverse")
fun initial() = FlexWrap("initial")
fun inherit() = FlexWrap("inherit")
}
}

View File

@@ -234,6 +234,12 @@ open class Style(
var emptyCells: EmptyCells? = null,
var filter: TextProperty? = null,
var flex: TextProperty? = null,
var flexBasis: Measurement? = null,
var flexDirection: FlexDirection? = null,
var flexFlow: TextProperty? = null,
var flexGrow: FlexGrowShrink? = null,
var flexShrink: FlexGrowShrink? = null,
var flexWrap: FlexWrap? = null,
var float: Float? = null,
var font: TextProperty? = null,