Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MattCCC opened this issue Apr 29, 2021 · 4 comments
Open

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

MattCCC opened this issue Apr 29, 2021 · 4 comments

Comments

@MattCCC
Copy link

MattCCC commented Apr 29, 2021

Describe the bug
Classes inside of the .vue files applied using @apply, within scss <style> tags don't work

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

@praveenperera
Copy link
Contributor

praveenperera commented Apr 29, 2021

Can you try the new version that we are going to be releasing soon: #122

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

@jayarjo
Copy link

jayarjo commented May 14, 2021

@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
Copy link

jayarjo commented May 14, 2021

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.

@nicdford
Copy link

nicdford commented Dec 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants