Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with global styles Nuxt-3 #2480

Open
meliceanu opened this issue Jan 8, 2025 · 0 comments
Open

Problems with global styles Nuxt-3 #2480

meliceanu opened this issue Jan 8, 2025 · 0 comments

Comments

@meliceanu
Copy link

meliceanu commented Jan 8, 2025

Hello,

i have configured the global styles in my Nuxt3 project, following the correct documentation for both Dart-sass and Nuxt-3.

Even though all seems correct i still encounter problems when i try to use variables, other .scss files. Variables work correctly when i use them directly in the component and not in a .scss file.

This is the current configuration

Screenshot 2025-01-08 at 14 48 13

These variables are not directly accessible in other .scss files but i have to manually recall the variables like this:

Screenshot 2025-01-08 at 14 48 21

Which is repeating the initial global setup.

I import manually the variables in every single other .scss file that uses the variables.

This is the current structure:
Screenshot 2025-01-08 at 14 51 40

And each _index.scss is basically like this, with their relative files, using @forward:
Screenshot 2025-01-08 at 14 53 09

Am i doing something wrong?

I use the latest versions of both Nuxt-3 and Sass.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant