You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use CSS Peak extension but it doesn't work, on a quick sneak peek it appears that the extension only parses CSS files present in the project.
But lit only uses css literals.
I'd like to know if there is a similar extension for the Lit framework.
If not, how hard would it be to create such an extension?
I am not really comfortable how to build extensions in VSCode but if you are enthusiastic maybe we can group and join our forces to make it possible.
Switching between files is so exhausting on the long run. But really jumping between html and css definitions is one of the most exhausting repeats.
At least if there were an extension we could just click a tag in the class list and let the editor navigates for us.
Here is the logic :
parses currently opened files (or on opening)
if it is a LitElement extended class we scan the static styles property
v1: parse the css literals (on file change also) and update the data structure (cssSelector <=> lineIndex)
v2: parse the css literals in according imports ....
when the user clicks on a class name, check the first matching className = cssSelector and jump to lineIndex.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I tried to use
CSS Peak
extension but it doesn't work, on a quick sneak peek it appears that the extension only parses CSS files present in the project.But lit only uses
css
literals.I'd like to know if there is a similar extension for the Lit framework.
If not, how hard would it be to create such an extension?
I am not really comfortable how to build extensions in VSCode but if you are enthusiastic maybe we can group and join our forces to make it possible.
Switching between files is so exhausting on the long run. But really jumping between html and css definitions is one of the most exhausting repeats.
At least if there were an extension we could just click a tag in the class list and let the editor navigates for us.
Here is the logic :
LitElement
extended class we scan thestatic styles
propertycss
literals (on file change also) and update the data structure (cssSelector
<=>lineIndex
)css
literals in according imports ....className
=cssSelector
and jump tolineIndex
.Beta Was this translation helpful? Give feedback.
All reactions