In ElementAnalyzer, I think we can get rid of the distinction of analyze and analyzeForRewrite and just make everything use analyzeForRewrite (which we would then rename to analyze). There's very little benefit to this, it's really just a microoptimization to store less data in situation where we don't need it, but it's adding a lot of unnecessary code complexity.
Then we need to augment how much information we store about where the styles are in the template. The current source locations that we capture aren't specific enough for vscode. For this, we need to augment ElementAnalysis in @css-blocks/core so that for every static and dynamic style we capture there's an associated node location. For instance I suspect we'll need to change
In ElementAnalyzer, I think we can get rid of the distinction of
analyze
andanalyzeForRewrite
and just make everything useanalyzeForRewrite
(which we would then rename toanalyze
). There's very little benefit to this, it's really just a microoptimization to store less data in situation where we don't need it, but it's adding a lot of unnecessary code complexity.Then we need to augment how much information we store about where the styles are in the template. The current source locations that we capture aren't specific enough for vscode. For this, we need to augment
ElementAnalysis
in@css-blocks/core
so that for every static and dynamic style we capture there's an associated node location. For instance I suspect we'll need to changeto be