Skip to content

Warn if user declares a CssStyle / Keyframes instance anywhere but the top level #63

Description

@bitspittle

For example

@Page
@Composable
fun SomePage() {
   val ExampleStyle = CssStyle { ... }
}

Styles must be declared at the top level (or inside an object), but we can't detect and warn about this case because KSP doesn't give us insight into what is happening inside methods. So we can use the IDE plugin to capture these cases.

We might also provide an action to move these properties up to the top level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    IDE: ActionAn IDE action (something a user might tie to a keyboard shortcut)IDE: InspectionSome information that should be surfaced to the user (tooltip, notification, lint warning)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions