Skip to content

Imported custom property false positive analysis #2776

@idoros

Description

@idoros

The CSS custom property analyzeInit hook is wrongly considering any named imported symbol that starts with -- as a custom property and register a symbol for it. This is wrong as a CSS class might also start with --.

This should be fixed by not assuming the type from the import at the analyze flow, and only creating a custom property symbol when encountering a @property --prop, --prop or var(--prop). And adding an import reference if one with the same name exist, similarly to how classes and other symbols work.

see playground for reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected behavior or exceptioncoreProcessing and transforming logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions