SASS syntax error: Identifier is expected svelte(css-syntax-error)
See original GitHub issueDescribe 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
System (please complete the following information):
- OS: Manjaro Linux
- IDE: VSCode
- Plugin/Package: Svelte for VSCode, eslint
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you think SASS will be supported in the future ?
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.