Shagen Ogandzhanian
3 years ago
4 changed files with 121 additions and 99 deletions
@ -0,0 +1,24 @@
|
||||
/* |
||||
* 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.css |
||||
|
||||
import org.jetbrains.compose.web.css.keywords.CSSAutoKeyword |
||||
|
||||
fun StyleBuilder.width(value: CSSNumeric) { |
||||
property("width", value) |
||||
} |
||||
|
||||
fun StyleBuilder.width(value: CSSAutoKeyword) { |
||||
property("width", value) |
||||
} |
||||
|
||||
fun StyleBuilder.height(value: CSSNumeric) { |
||||
property("height", value) |
||||
} |
||||
|
||||
fun StyleBuilder.height(value: CSSAutoKeyword) { |
||||
property("height", value) |
||||
} |
@ -0,0 +1,49 @@
|
||||
/* |
||||
* 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.css |
||||
|
||||
fun StyleBuilder.flexDirection(flexDirection: FlexDirection) { |
||||
property("flex-direction", flexDirection.value) |
||||
} |
||||
|
||||
fun StyleBuilder.flexWrap(flexWrap: FlexWrap) { |
||||
property("flex-wrap", flexWrap.value) |
||||
} |
||||
|
||||
fun StyleBuilder.flexFlow(flexDirection: FlexDirection, flexWrap: FlexWrap) { |
||||
property( |
||||
"flex-flow", |
||||
"${flexDirection.value} ${flexWrap.value}" |
||||
) |
||||
} |
||||
|
||||
fun StyleBuilder.justifyContent(justifyContent: JustifyContent) { |
||||
property( |
||||
"justify-content", |
||||
justifyContent.value |
||||
) |
||||
} |
||||
fun StyleBuilder.alignSelf(alignSelf: AlignSelf) { |
||||
property( |
||||
"align-self", |
||||
alignSelf.value |
||||
) |
||||
} |
||||
|
||||
fun StyleBuilder.alignItems(alignItems: AlignItems) { |
||||
property( |
||||
"align-items", |
||||
alignItems.value |
||||
) |
||||
} |
||||
|
||||
fun StyleBuilder.alignContent(alignContent: AlignContent) { |
||||
property( |
||||
"align-content", |
||||
alignContent.value |
||||
) |
||||
} |
||||
|
@ -0,0 +1,48 @@
|
||||
/* |
||||
* 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.css |
||||
|
||||
import org.jetbrains.compose.web.css.keywords.CSSAutoKeyword |
||||
|
||||
fun StyleBuilder.position(position: Position) { |
||||
property( |
||||
"position", |
||||
position.value |
||||
) |
||||
} |
||||
|
||||
fun StyleBuilder.top(value: CSSLengthOrPercentageValue) { |
||||
property("top", value) |
||||
} |
||||
|
||||
fun StyleBuilder.top(value: CSSAutoKeyword) { |
||||
property("top", value) |
||||
} |
||||
|
||||
fun StyleBuilder.bottom(value: CSSLengthOrPercentageValue) { |
||||
property("bottom", value) |
||||
} |
||||
|
||||
fun StyleBuilder.bottom(value: CSSAutoKeyword) { |
||||
property("bottom", value) |
||||
} |
||||
|
||||
fun StyleBuilder.left(value: CSSLengthOrPercentageValue) { |
||||
property("left", value) |
||||
} |
||||
|
||||
fun StyleBuilder.left(value: CSSAutoKeyword) { |
||||
property("left", value) |
||||
} |
||||
|
||||
fun StyleBuilder.right(value: CSSLengthOrPercentageValue) { |
||||
property("right", value) |
||||
} |
||||
|
||||
fun StyleBuilder.right(value: CSSAutoKeyword) { |
||||
property("right", value) |
||||
} |
||||
|
Loading…
Reference in new issue