rjaros / kvision

Object oriented web framework for Kotlin/JS
https://kvision.io
MIT License
1.24k stars 66 forks source link

Some styles not added to rendered HTML #538

Open bonzaiferroni opened 2 months ago

bonzaiferroni commented 2 months ago

I've been trying to assign the flex-grow style like this:

div("peanut butter jelly time") {
    background = Background(Color("green"))
    fontSize = 32.px
    flexGrow = 1
    fontFamily = "Times New Roman"
}

expecting a css property of flex-grow = 1; in the element that gets rendered. It doesn't appear to have that property:

<div style="background: green; font-size: 32px; font-family: Times New Roman;">peanut butter jelly time</div>

This appears to be the case for flex-shrink and order but not other properties I tried.

rjaros commented 1 month ago

I can't reproduce the problem. All three properties are working fine for me. Which version of KVision do you use?

rjaros commented 1 month ago

Perhaps your browser simply does not display these properties because they are not active in this context. You also need to add display = Display.FLEX for them to work.