https://kotlinlang.org logo
#javascript
Title
# javascript
c

Chrys

02/29/2024, 2:22 PM
is
head { style{ +"styles in string "} }
the most kotlinesque way to achieve the equivalent of this html:
Copy code
<head>
    <style>
        #api{
            // some style definitions
        }
        .heading h1{
            // some style definitions

        }
        #attributeList{
            // some style definitions

        }
        .attrEntry input:focus{
            // some style definitions
        }
        #api button:hover {
            // some style definitions

        }
        .divider h2, .create p{
            // some style definitions

        }

        #attributeList + .buttons{
            // some style definitions

        }
        @media only screen and (max-width: 720px) {
            html{
            // some style definitions
            }
        }
    </style>
</head>
t

turansky

02/29/2024, 5:25 PM
Globals
component from
koltin-emotion
can do this (if you use React)