question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weird coloring and `@apply` issues in SCSS files (or in Vue SFCs)

See original GitHub issue

Here’s my repo, you can see that I have src/stylesheets/scrollbar.scss that is imported within a root.scss file in the same directory, and I import that root in my nuxt.config.js > css. When I tried using Windi classes (with @apply), it didn’t work in those files (you can check blame to see how I switched to variables instead). This only happens for external SCSS files. I tried some methods, putting that directory in includes of windi.config.js but no luck there either.

There’s also another issue with @apply in both external files and in SFC style tags. They’re not colored, which makes it look like it’s not a part of the code. I don’t think it’s because of my VSC theme (I use Dracula) because, before the switch from Tailwind’s official extension, they were all colored with no problems.

image

You see that the coloring of @apply is missing and all classes look weird. You can see here how it was when using Tailwind’s extension).

🌟 One idea!

One thing I always cried about Tailwind’s extension is that it wasn’t able to sort classes in @apply. It’s not important but it’d be amazing to see this in Windi’s extension! If this is possible, I can create a different issue for this!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

0reactions
alexanderniebuhrcommented, Aug 15, 2021

just going to close since there was no much activity lately, if some issue still exists please reopen a new issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

SCSS no longer being highlighted in Vue SFCs #164 - GitHub
As of the most recent update to this package, SCSS is no longer being highlighted in any way within.
Read more >
Can't load global scss variables in Vue SFCs - Stack Overflow
I tried to follow this tutorial to get access to a global file called variables.scss in all SFC files: ...
Read more >
Working with CSS - Vue CLI
Working with CSS #. Vue CLI projects come with support for PostCSS, CSS Modules and pre-processors including Sass, Less and Stylus.
Read more >
Styling Vue components with CSS - Learn web development
To start with, create a file called reset.css in the src/assets directory. Files in this folder get processed by Webpack. This means we...
Read more >
Extracting Style CSS From Vue Components - Laracasts
I want to extract the styles from the components completely and have them stored in a stylesheet. No styles in SFC for me....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found