Skip to content

Commit

Permalink
Adjust output for kobweb 0.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisTsar committed Jun 20, 2024
1 parent edfeb72 commit e606a0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private fun Map<String, ParsedProperty>.combineBackgroundModifiers(): Map<String
val existingArgs = (existingBackgroundArgs?.get(index) as Arg.Function?)?.args.orEmpty()
val combinedArgs = (existingArgs + args).sortedBy { argNames.indexOf(it.toString().substringBefore(" ")) }

Arg.Function("CSSBackground", combinedArgs)
Arg.Function("Background.of", combinedArgs)
}.orEmpty().reversed() // args order reversed as in kobweb

val color = this["backgroundColor"]?.args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private fun parseBackground(value: String): List<Arg> {
}
}
}
Arg.Function("CSSBackground", backgroundArgs)
Arg.Function("Background.of", backgroundArgs)
}.filter { it.args.isNotEmpty() }

val color = backgrounds.first().splitNotInParens(' ').firstNotNullOfOrNull { Arg.asColorOrNull(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ internal fun Arg.Function.Companion.transition(
}

private fun transitionOf(args: List<Arg>): Arg.Function {
val extra = if (args.first() is Arg.Function) ".group" else ""
return Arg.Function("CSSTransition$extra", args)
val function = if (args.first() is Arg.Function) "group" else "of"
return Arg.Function("Transition.$function", args)
}

0 comments on commit e606a0f

Please sign in to comment.