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

Added multiple element preview on hover of scss selector #308

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GauravB159
Copy link
Contributor

Partial fix for #249

Still need to figure out the logic for specificity. There seems to be some kind of bug in the production build itself.

Still need to add tests for the new feature.

@GauravB159
Copy link
Contributor Author

image

Such cases have not been handled yet, only the case where an element's immediate parents are multiple has been handled. I'm not sure if we want to handle this case, since it might just get too complicated. If needed, I can possibly extend it to cover this as well using a recursive method.

@aeschli
Copy link
Contributor

aeschli commented Nov 8, 2022

Yes, I agree that this can get very complicated. The hover size should not get too long. Maybe write (1 more) behind <element class="div-two"> ?

@GauravB159
Copy link
Contributor Author

Hmm, I'm not sure how to limit the depth. Possibly depends on what the most frequent use case for this would be. I don't think people would want to preview a really deep node list anyways.

I'm not sure what you mean by write one more behind <element class="div-two">?

Basically, the way it currently works is, if the second to last nested selector has multiple values, it picks up those, but other than that it picks the first selector in each ancestor.

Basically a depth of 1, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants