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.

SASS syntax error: Identifier is expected svelte(css-syntax-error)

See original GitHub issue

Describe the bug When I run eslint, or use VSCode, I get the error Identifier is expected˙svelte(css-syntax-error) in the beginning of all components that use sass (<style lang="sass"></style>) To Reproduce Create a svelte component in a project with node-sass and sass and create a style tag with lang="sass". Write a basic style, for e.g.:

<style lang="sass">
  .Test
    display: block
</style>

Expected behavior There should be no errors, since the style has the sass lang attr

Screenshots image

System (please complete the following information):

  • OS: Manjaro Linux
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode, eslint

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
7antracommented, Aug 24, 2020

SASS is unfortunately not supported at the moment, because the css language service we use does not support it. But we should at least somehow turn off all diagnostics to not show you these false errors.

Do you think SASS will be supported in the future ?

2reactions
dummdidummcommented, Jul 26, 2020

SASS is unfortunately not supported at the moment, because the css language service we use does not support it. But we should at least somehow turn off all diagnostics to not show you these false errors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in svelte.config.js and Error: Identifier is expected in scss ...
After uncommenting it and saving the page loads fine and the server doesn't error. The offending style tag is: <style lang="scss"> .container ...
Read more >
[warning] expected identifier but found "*" [css-syntax-error]
Trying to take over from another developer who has used this placeholder class in their SCSS style file. I want to apply a...
Read more >
PostCSS API 中文文档
AtRule#error(). Returns a CssSyntaxError instance containing the original position of the node in the source, showing line and column numbers and also a...
Read more >
svelte-preprocess - npm
A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors. Latest version: 5.0.0, last published: 16 days ago.
Read more >
stylelint for SvelteKit: Keep your SCSS Code Consistent
The postcss-html appears to have fixed the CssSyntaxError, but now I notice that all of my styles defined in .svelte files seem to...
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