postcss / postcss-media-minmax

Writing simple and graceful Media Queries!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VC Code + Svelte/Sapper trouble

koddr opened this issue · comments

Hi! 👋 Many thanks for this PostCSS plugin.

I have some trouble with it at my VS Code:

Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-10T08:59:06.977Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0

I use latest Sapper version:

    // ...
    "sapper": "^0.27.15",
    "svelte": "^3.23.2"
}

And its linter always show me this error:

Screenshot 2020-06-12 at 13 32 35

How to solve this? Maybe someone faced with similar problem?

Thanks! 😉

@koddr try to disable diagnostic messages - https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode#svelteplugincssdiagnostics

As I understand svelte-vscode doesn't support new css features.

@Semigradsky thanks for reply, but it's not (fully) works.

VS Code CSS validation is gone, but I still see css-syntax-error message by Svelte:

Screenshot 2020-06-13 at 13 04 54

Colon is expected. If you expect this syntax to work, here are some suggestions: 
If you use less/SCSS with `svelte-preprocessor`, did you add `lang="scss"`/`lang="less"` 
to you `style` tag? If you use SCSS, it may be necessary to add the path to your NODE 
runtime to the setting `svelte.language-server.runtime`, or use `sass` instead of `node-sass`.
Did you setup a `svelte.config.js`? See https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode#using-with-preprocessors 
for more info.svelte(css-syntax-error)

There may be a way to tell Svelte parser to support your PostCSS plugin in *.svelte files?

There is no need to support 'PostCSS plugin', need to support 'CSS Media Queries Level 4' feature.

Feel free to open issue in the sveltejs/language-tools repo, that is not a postcss-media-minmax issue.