headwind icon indicating copy to clipboard operation
headwind copied to clipboard

Doesn't work with @apply within scss Vue <style> tags

Open MattCCC opened this issue 3 years ago • 4 comments

Describe the bug Classes inside of the .vue files applied using @apply, within scss

To Reproduce Steps to reproduce the behavior:

  1. Install headwind
  2. Initialize a component with scss style
  3. Use @apply and add multiple classes
  4. See error

Expected behavior Classes are sorted.

Screenshots image

MattCCC avatar Apr 29 '21 19:04 MattCCC

Can you try the new version that we are going to be releasing soon: https://github.com/heybourn/headwind/issues/122

https://github.com/heybourn/headwind/files/6361713/headwind-2.0.0.vsix.zip

praveenperera avatar Apr 29 '21 19:04 praveenperera

@praveenperera It seems to have problem recognizing files with scss extension. If I rename it to css - it works. Any way to tell it to treat scss files the same way as css ones?

jayarjo avatar May 14 '21 07:05 jayarjo

Although VScode seems to have language id for scss here and I define my headwind.classRegex like this (basically a copy/paste of css rule from package.json):

"headwind.classRegex": {
    "scss": "\\B@apply\\s+([_a-zA-Z0-9\\s\\-\\:\\/]+);"
},

It fails to recognize it. However when I change either an extension or language association to CSS, it starts working. I'm using latest VScode - 1.56 and headwind-2.0.0.vsix.

jayarjo avatar May 14 '21 08:05 jayarjo

Although VScode seems to have language id for scss here and I define my headwind.classRegex like this (basically a copy/paste of css rule from package.json):

This solution seems to work fine for me when I include it in my settings.json file using v2 and VS code v1.62.3.

nicdford avatar Dec 07 '21 19:12 nicdford