简体   繁体   中英

How do i assign css properties when using DSL CSS in Kotlin/Js

I am very new to kotlin/Js and I am trying to style a page but most of the CSS attributes don't seem to support primitive values and the default values in the csstype package do not give me what i want.

How do i set the values for the fields marked with '?'.

css {

            html{
                scrollBehavior = ScrollBehavior.smooth
            }
           root {
                fontFamily = FontFamily.cursive
                fontSize = FontSize.large
                backgroundColor = NamedColor.antiquewhite
            }
            a{
                hover {
                    color = NamedColor.green
                }
                textDecoration = TextDecoration.none
                color = NamedColor.cadetblue
            }
            ul{
                listStyleType = ListStyleType.none

            }

            ul{
                gap = ??
                display = Display.flex
                li{
                    fontWeight = FontWeight(700)
                }
            }

            body{
                fontFamily = ??
            }

             

                h1{
                    color = NamedColor.cadetblue
                }





            css("burger-menu"){
                color = NamedColor.cadetblue
                fontSize = FontSize.medium
                border = Border(Length("0"), LineStyle.none)
                cursor = Cursor.pointer
                display = Display.none
            }
            

                h1{
                    color = NamedColor.cadetblue
                }

            }*/

        }

fontFamily = FontFamily.None gap = Gap.normal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM