Ji Sungbin
h1 span{ width:100%; position:relative } h1 span:before{ background:linear-gradient(45deg,#fc5c7d,#6a82fb,#fc5c7d); width:100%; height:100%; display:block; position:absolute; content:""; mix-blend-mode:screen }
Span({ classes(AppStylesheet.h1Span) style { width(100.percent) position(Position.Relative) } }) { ... } object AppStylesheet : StyleSheet() { val h1Span by style { before style { width(100.percent) height(100.percent) display(DisplayStyle.Block) position(Position.Absolute) background("linear-gradient(45deg,#fc5c7d,#6a82fb,#fc5c7d)") property("content", "") property("mix-blend-mode", "screen") } } }
Chrimaeon
import org.jetbrains.compose.web.css.Style Div { Style(AppStylesheet) Span({ classes(AppStylesheet.h1Span) style { width(100.percent) position(Position.Relative) } }) { ... } }
fun main() { setContent { Style(AppStylesheet) IntroScreen() } }
IntroScreen()
screen
A modern programming language that makes developers happier.