gencer / SCSS-Everywhere

A Visual Studio Code extension that provides CSS class and ID atttribute completion with incremental build and usage explorer for the HTML class attribute based on the CSS/Template files in your workspace. Also supports React's className attribute.
https://marketplace.visualstudio.com/items?itemName=gencer.html-slim-scss-css-class-completion
MIT License
24 stars 9 forks source link

Support :class="..." in vue template #60

Closed ram-you closed 3 years ago

ram-you commented 3 years ago

Hi, worked perfectly inside class="..." in vue template but not inside :class="..." Thank you.

gencer commented 3 years ago

Hey @ram-you.

I just had a look at Vue's :class and it seems it is not a simple string but conditional syntax's used there. Like:

:class="{ 'klass': klass }"

I am not sure how should we complete here because all we do in here is regex. If I add escape characters will this be enough? For example:

v1.7.8

html-slim-scss-css-class-completion-1.7.8.zip

Can you test this version and let me know?

ram-you commented 3 years ago

@gencer Thank you very much. v1.7.8 works perfectly.

gencer commented 3 years ago

I'm glad to hear that. I will revisit this issue at a later time for a better regex pattern match. Because, currently its a bit hacky.