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

only detect the style sheet of the current html file link for content analysis. #81

Open lsrweb opened 1 year ago

lsrweb commented 1 year ago

Suggest a function like this: For example, only detect the style sheet of the current html file link for content analysis. Other external style sheets without links do not perform style parsing

image For example, in this case, when there are many files in the workspace, there will be a lot of results that I don't want to appear.

pucelle commented 1 year ago

This is a good idea and seems useful, but hard to be done:

It's hard to analysis what's HTML piece that css code should relate to, both HTML and CSS may become code snippets and are included by another file.

But there is an alternative way:

  1. Find css definitions in current document, if found, stop.
  2. Find css definitions from all the imported files, if found, stop.
  3. Find css definitions across whole workspace.