Repository: JetBrains/compose-multiplatform
File: html/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleSheet.kt (Kotlin)

Code before:

/**
 * Represents a collection of the css style rules.
 * StyleSheet needs to be mounted.
 *
 * @param prefix Will be used as prefix with current style. Pass `null` to use default value (classname of realization)
 *
 * @see [Style]
 *
 * Example:
 * ```
 * object AppStylesheet : StyleSheet() {
 *     val containerClass by style {
 *         padding(24.px)
 *     }
 * }
 * ```
 *
 * Usage Example:
 * ```
 *    Style(AppStylesheet) // this mounts the stylesheet
 *    Div(classes = listOf(AppStylesheet.containerClass),...)
 * ```
 */
open class StyleSheet(
    prefix: String?,
    private val rulesHolder: CSSRulesHolder = CSSRulesHolderState(),
) : StyleSheetBuilder, CSSRulesHolder by rulesHolder {
    private val boundClasses = mutableMapOf<String, CSSRuleDeclarationList>()
    protected val prefix: String = prefix ?: "${this::class.simpleName}-"

    val usePrefix: Boolean = prefix == null
    constructor(
        rulesHolder: CSSRulesHolder = CSSRulesHolderState(),
        usePrefix: Boolean = true
    ) : this(
        if (usePrefix) null else "",
        rulesHolder
    )

    protected fun style(cssRule: CSSBuilder.() -> Unit) = CSSHolder(prefix, cssRule)

    /**
     * Example:
     * ```
     * object AppStyleSheet : StyleSheet() {
     *  val bounce by keyframes {
     *  from {
     *       property("transform", "translateX(50%)")
     *  }
     *

Review comment (suggestion):
Does it make sense in your opinion to name this constructor parameter something like `customNamePrefix` or just `customPrefix`?
So it's not confused with `protected val prefix: String`... 

Then it will be easier with this line:
`val usePrefix: Boolean = prefix == null` // by looking at this line it's not clear right away what `prefix` is meant here (from constrcutor of the property)


Code after:

/**
 * Represents a collection of the css style rules.
 * StyleSheet needs to be mounted.
 *
 * @param customPrefix Will be used as prefix with current style. Pass `null` to use default value (classname of realization)
 *
 * @see [Style]
 *
 * Example:
 * ```
 * object AppStylesheet : StyleSheet() {
 *     val containerClass by style {
 *         padding(24.px)
 *     }
 * }
 * ```
 *
 * Usage Example:
 * ```
 *    Style(AppStylesheet) // this mounts the stylesheet
 *    Div(classes = listOf(AppStylesheet.containerClass),...)
 * ```
 */
open class StyleSheet(
    customPrefix: String?,
    private val rulesHolder: CSSRulesHolder = CSSRulesHolderState(),
) : StyleSheetBuilder, CSSRulesHolder by rulesHolder {
    private val boundClasses = mutableMapOf<String, CSSRuleDeclarationList>()
    protected val prefix: String = customPrefix ?: "${this::class.simpleName}-"

    val usePrefix: Boolean = customPrefix == null
    constructor(
        rulesHolder: CSSRulesHolder = CSSRulesHolderState(),
        usePrefix: Boolean = true
    ) : this(
        if (usePrefix) null else "",
        rulesHolder
    )

    protected fun style(cssRule: CSSBuilder.() -> Unit) = CSSHolder(prefix, cssRule)

    /**
     * Example:
     * ```
     * object AppStyleSheet : StyleSheet() {
     *  val bounce by keyframes {
     *  from {
     *       property("transform", "translateX(50%)")
     *  }
     *