Closed
Description
Describe the bug
Within my style
tag in a component.svelte
page, logical media query is throwing an error.
Reproduction
<!-- taken from MDN -->
<article class="forecast">
<h1>Weather forecast for Seattle</h1>
<article class="day-forecast">
<h2>03 March 2018</h2>
<p>Rain.</p>
</article>
<article class="day-forecast">
<h2>04 March 2018</h2>
<p>Periods of rain.</p>
</article>
<article class="day-forecast">
<h2>05 March 2018</h2>
<p>Heavy rain.</p>
</article>
</article>
<style>
@media (width >= 53rem) {
.forecast {
background-color: rebeccapurple;
}
}
</style>
- I am not using any preprocessors
Logs
ERROR being shown in VSC:
Colon is expected
If you expect this syntax to work, here are some suggestions:
If you use less/SCSS with `svelte-preprocess`, did you add `lang="scss"`/`lang="less"` to your `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/docs#using-with-preprocessors for more info.svelte(css-syntax-error)
System Info
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 6.43 GB / 15.85 GB
Binaries:
Node: 19.1.0 - C:\Program Files\nodejs\node.EXE
npm: 9.2.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.1265.0), Chromium (110.0.1587.50)
Internet Explorer: 11.0.22621.1
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels