Closed xiaoluoboding closed 2 years ago
Facing similar issue
You'll have to use interpolation on the variable name.
...more recent versions of Sass require SassScript expressions in custom property values to be written within interpolation.
See https://sass-lang.com/documentation/breaking-changes/css-vars
$--text-light: rgba(0, 0, 0, 0.75);
h1 {
color: #{$--text-light};
}
You can see it working here: https://stackblitz.com/edit/nuxt-starter-jste7l?file=app.vue
Describe the bug
Can not use sass variables when using Nuxt 3.
To Reproduce
Checkout: https://stackblitz.com/edit/nuxt-starter-27pv52
Expected behavior
Both use sass and windicss normally.
Screenshots
Additional context Add any other context about the problem here.