Skip to content

Syntax highlight problem in SASS format #460

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

Closed
lucasvazq opened this issue Jan 8, 2022 · 0 comments · Fixed by #461
Closed

Syntax highlight problem in SASS format #460

lucasvazq opened this issue Jan 8, 2022 · 0 comments · Fixed by #461

Comments

@lucasvazq
Copy link
Contributor

What version of Tailwind CSS IntelliSense are you using?

For example: v0.7.5

What version of Tailwind CSS are you using?

For example: v3.0.12

What package manager are you using?

For example: yarn

What operating system are you using?

For example: Manjaro

Reproduction URL

https://github.com/lucasvazq/tailwindcss-intellisense-error

Describe your issue

I was working on a new project, to which I added tailwindcss and decided to install this extension for VSCode, and I get an undesired error.

Screenshot_2022-01-08_23-00-55

'base
@tailwind components
@tailwind utilities

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap")
' is not a valid value. Did you mean 'base'?(invalidTailwindDirective)

The first thing I did was try to fix it with the editor Quick Fix -> Replace with 'base'. The result was the following:

Screenshot_2022-01-08_23-11-30

After that, I wanted to add a new line and started seeing the problem again:

Screenshot_2022-01-08_23-04-32

'base
' is not a valid value. Did you mean 'base'?(invalidTailwindDirective)

So, I started testing, and I realized that the problem is because the extension expects that always after the tailwind directives there be a semicolon.

Screenshot_2022-01-09_01-49-32

This is okay for most syntaxes, but I'm using SASS (not SCSS), and I don't need to add a semicolon.

Related code: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts#L34

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

Successfully merging a pull request may close this issue.

1 participant