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

"css-ruleorselectorexpected" when combine "apply" with "important" in .vue style tag #718

Closed
horans opened this issue Feb 27, 2023 · 2 comments

Comments

@horans
Copy link

horans commented Feb 27, 2023

What version of Tailwind CSS IntelliSense are you using?

v0.9.7

What version of Tailwind CSS are you using?

v3.2.7

What package manager are you using?

npm

What operating system are you using?

Windows10

Tailwind config

Describe your issue

I am running TailwindCSS with Vue/Vite and SASS. When I trying to employ #{!important} along with @apply in my .vue component's style tag, VScode is showing "at-rule or selector expectedscss(css-ruleorselectorexpected)" error at the end. However it's ok to run/compile, so I guess it has something to do with VScode displaying.

/* ✔ works just fine */
<style lang="scss">
.test-ok {
  @apply m-0;
}
</style>
/* ❌ showing error but ok to run */
<style lang="scss">
.test-error {
  @apply m-0 #{!important};
} //at-rule or selector expectedscss(css-ruleorselectorexpected)
</style>

possible related issues:

@bradlc
Copy link
Contributor

bradlc commented Mar 10, 2023

Hey @horans. Unfortunately this is not something we can control. The only way that I'm aware of to suppress the message is to disable SCSS validation using the scss.validate setting:

"scss.validate": false

I hope that helps!

@bradlc bradlc closed this as completed Mar 10, 2023
@relliv
Copy link

relliv commented Mar 4, 2024

@bradlc hi, thanks for the suggestion. when I added this to the .vscode/settings.json file and then the error was suppressed.

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

3 participants