`at-rule or selector expected `, `semicolon expected`, etc. errors with SelvteKt
See original GitHub issueDescribe the bug
When I add vite-plugin-windicss
to a SvelteKit project, I receive errors around the WinidiCSS syntax. Certainly the @apply
directive, but maybe others. For example:
The actual compile works because things are as expected at runtime.
I’ve seen #98, but I don’t grok a solution other than that issue is fixed.
Side note: @apply
’s with only one class are fine.
Minimal Reproductions A minimal reproduction is here: https://github.com/abalmos/windi-sevltekit-min-repo/
Use yarn run dev
to start the example and yarn run check
to see the errors.
The line in question is: https://github.com/abalmos/windi-sevltekit-min-repo/blob/837fb905e02097db3c69f552a96ae067d8dff6d8/src/routes/index.svelte#L6
Versions
- vite-plugin-windicss: 1.3.0
- vite: 2.5.3
- framework(vue/react/svelte/etc): SvelteKit
Additonal Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How to fix the at-rule or selector expected error - Stack Overflow
I checked for missing semi-colons, improper indentation, etc; but nothing seems to fix the issue. @charset "UTF-8"; h1 { text-align: center; ...
Read more >At-rule or Selector expected error- Following Jekyll Tutorial
Hi, I'm following the Jekyll tutorial and I'm having a problem on the Assets step (https://jekyllrb.com/docs/step-by-step/07-assets/).
Read more >At-rules - CSS: Cascading Style Sheets - MDN Web Docs
At-rules are CSS statements that instruct CSS how to behave. They begin with an at sign, '@' (U+0040 COMMERCIAL AT), followed by an ......
Read more >PostCSS API
toJSON() // save to file, send by network, etc const root2 = postcss. ... PostCSS cleans selectors, declaration values and at-rule parameters from...
Read more >selector-max-compound-selectors - Stylelint
Limit the number of compound selectors in a selector. div .bar[data-val] > ...
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 Free
Top 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
@alexanderniebuhr I am using both. I see the same errors in neovim driven by Svelte’s language server and in svelte-check. My original question was a screen shot from neovim, but I added reproduction steps with svelte check to avoid editor differences.
I do believe that svelte-check is working correctly and with preprocessors. It correctly deals with Typescript errors. I have never seen errors in neovim and not in svelte-check and vice versa.
Is this the proper plugin for WindiCSS? Should I be using
svelte-windicss-preprocess
? Based on the website docs and #98 I decided this was now the proper plugin. I didn’t have much luck withsvelte-windicss-preprocess
either.To use svelte with PostCSS in svelte you would need to use
svelte-preprocess
. You should also make use thatsvelte-preprocess
is done running before windi css runs. But since you are using site-plugin it should be fine.I actually can’t reproduce your errors, in any of mine or your repro. Are you sure you are on the latest updates on all extensions.
Another more general setting which helped a lot in the past is: