pucelle / vscode-css-navigation

Allowing Go to definition from HTML to CSS, or Find References from CSS to HTML.
https://marketplace.visualstudio.com/items?itemName=pucelle.vscode-css-navigation
MIT License
64 stars 8 forks source link

Nested scss definition #14

Closed FDiskas closed 3 years ago

FDiskas commented 5 years ago

image

Not sure is it possible to not suggest definition if the css path is not correct for current markup. I mean if --justify is a requirement for parent then it should not be in definition list if current html is not match :/ Probably to much I'm asking here :)

pucelle commented 5 years ago

Hi, FDiskas, Thanks for your suggestion. I also found the same problem before the plugin's first release, and I did a short mark at here.

Yes it's possible and not very hard to check parent nodes and make sure the whole selector match, although there is a small rate to make mistake: e.g., you only have a small piece of code <div class="x">, and it may can't match selector .a .x that you want...

So I planed when there are several CSS definitions got, e.g., .a .x, .b .x, .c .x, I will check parent elements to filter these results, and if no parent match, I still keep all the results. This is the best solution I found until now. If you have some good ideas, welcome to note here.

Otherwise sorry I'm very busy these days. I will complete all the planned features in some days after my main work finished, in about 2~3 months.

pucelle commented 5 years ago

Reopen, scheduled at early of September.

pucelle commented 4 years ago

Postpone to October.

pucelle commented 4 years ago

Sorry, I started my new career as a graphic algorithm engineer these days, I will keep working on this plugin after my hard time over.

pucelle commented 3 years ago

Closed, don't have a plan to implement it right now. Otherwise, From my experience, nesting selectors is a bad idea, we should focus on an unique and more meaningful class name.

pucelle commented 3 years ago

Reopen as more requests continuous come, Reference to #50.