sfy
sfy

Reputation: 3228

How to target pseudo controls using type-safe css in Kotlin

For example if I want to change the default style of a selected button, if using external css would like

button:selected {
...
}

How to do it with type-safe css?

Upvotes: 0

Views: 144

Answers (1)

Edvin Syse
Edvin Syse

Reputation: 7297

button and selected { } will render as .button:selected.

The selected pseudo class comes with the framework, but you could just as easily have created your own. It's defined like this in the Stylesheet class:

val selected by csspseudoclass()

Upvotes: 1

Related Questions