Skip to content

Cannot use !important on @apply of SCSS files and px is not tranform to rem #324

Open
@RLJ-Y

Description

Describe the bug
I tried to use @apply leading-90px !important; on an SCSS file and it gave me this error:

[plugin:vite:css] [sass] expected ";".
  ╷
2 │   @apply leading-90px  !important;
  │                        ^
  ╵
  src\assets\styles\public.scss 2:24  @use

in public.scss

.detail-header {
  @apply leading-90px  !important;
}

when i delete !important it is work。

leading-90px px is not tranform to rem,but when write it in xxx.vue's template it is tranform to rem

Minimal Reproductions

Versions

  • vite-plugin-windicss: 1.91
  • vite: 4.1.4
  • framework(vue/react/svelte/etc):vue

Additonal Context

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