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

Extension Fails to Find Nested Selectors #127

Closed
jwalkerinterpres opened this issue Feb 1, 2024 · 3 comments · Fixed by #128
Closed

Extension Fails to Find Nested Selectors #127

jwalkerinterpres opened this issue Feb 1, 2024 · 3 comments · Fixed by #128
Assignees
Labels
bug Something isn't working

Comments

@jwalkerinterpres
Copy link

jwalkerinterpres commented Feb 1, 2024

Describe the bug
The library's own readme states:

Different types of selectors are supported

Root selectors
Nested selectors

However, nested selectors are not supported, or at least not fully. When you create a nested selector in a CSS file, the extension shows it as not-existing in the JS(/JSX/TS):
image

As you can see on the left side of the screenshot, my JSX file has a yellow line under the secondParagraph, because (as you can see on the right) the style is defined as a nested style. But if I remove the nesting, the extension recognizes the selector just fine:
image

To Reproduce
Steps to reproduce the behavior:

  1. Create a nested selector
  2. Reference that selector in JSX
  3. See VS Code add a yellow squiggly line to the selector reference
  4. Remove the nesting of the selector
  5. See VS Code not add a line under the selector (now)

Expected behavior
It doesn't matter if the selector is nested or not; under the React CSS Modules standard the selector should be reference-able from the JSX.

Screenshots
See above

Desktop (please complete the following information):
I assume this is irrelevant, but

  • OS: Mac OS Sonoma 14.3
@jwalkerinterpres jwalkerinterpres added the bug Something isn't working label Feb 1, 2024
@Viijay-Kr
Copy link
Owner

@jwalkerinterpres Thanks for a detailed ticket . This issue is reproducible and valid to me. I will try to resolve it as soon as possible.

@Viijay-Kr
Copy link
Owner

@jwalkerinterpres the latest version should fix the issue for you .

@jwalkerinterpres
Copy link
Author

Thanks so much for the fix (and the extension)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants