Skip to content

postcss(css-lcurlyexpected) error when using PostCSS #103

@sto3psl

Description

@sto3psl

Hi there and first of all, thanks for this project!

I'm having some issues with using <style lang="postcss">.

I have a Vue 3 project with TailwindCSS and when using @apply in combination with normal CSS rules, I get an error postcss(css-lcurlyexpected).

Example code:
image

<style lang="postcss" scoped>
.panel {
  @apply p-4 bg-neutral-50;

  min-height: var(--space-14);
}
</style>

This does not happen in .css files or in any other project. Only when using Vue 3 and Volar. Does anyone have an idea why that is happening?

Volar Version: 0.22.16
VSCode Version: 1.54.3

Some VSCode settings I have:

  "volar.style.defaultLanguage": "postcss",
  "stylelint.enable": true,
  "tailwindCSS.validate": true,
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,

It doesn't matter though If I toggle these, the error still appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions