iari
03/16/2022, 11:04 AMRuleBuilder
instances?
With the old syntax I had these extensions
operator fun TagSelector.plus(other: TagSelector): TagSelector = TagSelector("$tagName, ${other.tagName}")
operator fun TagSelector.plus(other: String): TagSelector = TagSelector("$tagName, ${other}")
2. How do I generally specify complex css values?
Many expect types that are interfaces and there is no apparent constructor for them.
gridTemplateColumns = GridTemplateColumns(160.px, 1.fr)
gridTemplateRows = GridTemplateRows(72.px, 64.px, 1.fr)
gridColumn = "1 / 2" //GridColumn("1 / 2")
gridRow = GridRow("2 / span 2")
background = "linear-gradient(20deg, ${MyColors.GreenDark}, ${MyColors.Green2})"
Also I keep finding missing values like
overflowY = Overflow.auto
outline = Outline.none
textDecoration = TextDecoration.none
which used to work and now dow not exist
3. How Do I declare a fontFamily which includes custom fonts?
How do I do fontFace declarations?
I used to have this working
for ((fw, fwName) in listOf(
"100" to "Thin",
"300" to "Light",
"normal" to "Regular",
"500" to "Medium",
"600" to "SemiBold",
"bold" to "Bold",
"900" to "Black"
)) {
fontFace {
fontFamily = Goldplay.quoted.toString()
fontWeight = FontWeight(fw)
val srcValue = listOf(
"Goldplay-$fwName.woff2" to FontFormat.woff2,
"Goldplay-$fwName.woff" to FontFormat.woff
)
.map { (src, format) ->
"url('$src') format('$format')"
}.joinToString(",")
put("src", srcValue)
this.fontStyle = FontStyle.normal
}
}
4. How do I do keyframes declarations for animations?iari
03/16/2022, 11:18 AMoperator fun Selector.plus(other: Selector): Selector = Selector("$this, $other")
operator fun Selector.plus(other: String): Selector = Selector("$this, $other")
turansky
03/16/2022, 11:23 AMgridTemplateColumns = array(160.px, 1.fr)
turansky
03/16/2022, 11:23 AMturansky
03/16/2022, 11:25 AMauto
and none
// before
overflowY = Overflow.auto
outline = Outline.none
textDecoration = TextDecoration.none
// now
overflowY = auto // Auto.auto
outline = none // None.none
textDecoration = none // None.none
turansky
03/16/2022, 11:26 AMfontWeight = integer(600)
or
fontWeight = FontWeight.normal
turansky
03/16/2022, 11:27 AMbackground = linearGradient(20.deg, MyColors.GreenDark, MyColors.Green2)
iari
03/16/2022, 11:54 AMiari
03/16/2022, 11:59 AMgridColumn
and gridRow
I don't know yet how to do - they dont work with strings, I cant find a GridRow constructor function - and I wouldnt even know with arrays how to do what used to be GridRow("2 / span 2")
turansky
03/16/2022, 12:17 PMGridRow
and GridColumn
factories for start
Issue for futureturansky
03/16/2022, 12:18 PMiari
03/16/2022, 12:19 PMturansky
03/16/2022, 12:26 PMcsstype
packageturansky
03/16/2022, 12:27 PMiari
03/16/2022, 12:58 PMLocal GridRow and GridColumn factories for startI don'T understand what does that mean? Would this work?
gridColumn = "1 / span 2".unsafeCast<GridColumn>()
iari
03/16/2022, 1:00 PMReceiver already insidepackagecsstype
Only extension requiredI don't understand this either - could you give a code example?
turansky
03/16/2022, 1:09 PMinline fun GridRow(
value: String,
): GridRow =
value.unsafeCast<GridRow>()
turansky
03/16/2022, 1:12 PMturansky
03/16/2022, 1:12 PMRuleBuilder
extension