Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported custom property false positive analysis #2776

Open
idoros opened this issue Nov 9, 2022 · 0 comments
Open

Imported custom property false positive analysis #2776

idoros opened this issue Nov 9, 2022 · 0 comments
Labels
bug Unexpected behavior or exception core Processing and transforming logic

Comments

@idoros
Copy link
Collaborator

idoros commented Nov 9, 2022

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

@idoros idoros added bug Unexpected behavior or exception core Processing and transforming logic labels Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior or exception core Processing and transforming logic
Projects
None yet
Development

No branches or pull requests

1 participant