More properties, cleanup
This commit is contained in:
@@ -17,8 +17,7 @@ kotlin {
|
|||||||
* To find out how to configure the targets, please follow the link:
|
* 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 */
|
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets */
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js()
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
val commonMain by getting {
|
val commonMain by getting {
|
||||||
|
|||||||
42
src/commonMain/kotlin/nl/astraeus/css/properties/Flex.kt
Normal file
42
src/commonMain/kotlin/nl/astraeus/css/properties/Flex.kt
Normal 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")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -234,6 +234,12 @@ open class Style(
|
|||||||
var emptyCells: EmptyCells? = null,
|
var emptyCells: EmptyCells? = null,
|
||||||
var filter: TextProperty? = null,
|
var filter: TextProperty? = null,
|
||||||
var flex: 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 float: Float? = null,
|
||||||
var font: TextProperty? = null,
|
var font: TextProperty? = null,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user