Skip to content

Intercept pasted CSS #71

Description

@bitspittle

and convert it into Modifier / CssStyle code.

For example:

p,
li {
  color: green;
}

could generate:

@InitSilk
fun registerElementStyles(ctx: InitSilkContext) = ctx.stylesheet.apply {
    registerStyleBase("p, li") { Modifier.color(Colors.Green) }
 }

And

.special {
  color: orange;
  font-weight: bold;
}

could generate:

val SpecialStyle = CssStyle.base {
   Modifier.color(Colors.Orange).fontWeight(FontWeight.Bold)
}

See also: pasting Java into a Kotlin project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions