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

sass import warning #396

Open
Fukao0129 opened this issue Dec 24, 2024 · 3 comments
Open

sass import warning #396

Fukao0129 opened this issue Dec 24, 2024 · 3 comments
Labels
Type: Bug Something isn't working

Comments

@Fukao0129
Copy link

Versions

  • vue-toastification 2.0.0-rc.5
  • vue 3.8
  • nuxt 3.13
  • sass 1.80.5

Describe the bug

I'm trying to override the sass variables.
According to this document, I need to use @import.
But in Vue3, following warning occurs when I build the app.
DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

Expected behavior

No warnings

Steps to reproduce

Steps:

  1. Make a scss file.
$vt-color-success: {MY_COLORCODE}
$vt-color-error: {MY_COLORCODE}
@import "vue-toastification/src/scss/_variables";
@import "vue-toastification/src/scss/_toastContainer";
@import "vue-toastification/src/scss/_toast";
@import "vue-toastification/src/scss/_closeButton";
@import "vue-toastification/src/scss/_progressBar";
@import "vue-toastification/src/scss/_icon";
@import "vue-toastification/src/scss/animations/_bounce";
  1. Make a plugin file.
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
import "@/assets/style/admin/custom-toast.scss";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(Toast, {
    containerClassName: "custom-toast-class",
    icon: true,
  });
});
  1. Run npm run dev

Your Environment

  • Device: HP notebook
  • OS: Windows11, Linux, Docker Desktop
  • Browser: Google Chrome
@Fukao0129 Fukao0129 added the Type: Bug Something isn't working label Dec 24, 2024
@meirroth
Copy link

meirroth commented Dec 26, 2024

Seeing the same after upgrading sass/sass-loader

- "sass": "^1.77.8",
+ "sass": "^1.83.0",
- "sass-loader": "^16.0.0",
+ "sass-loader": "^16.0.4",

@EHOzg
Copy link

EHOzg commented Jan 3, 2025

maybe you can try @use

@yuuzora
Copy link

yuuzora commented Jan 9, 2025

Using @use create a new problem, saying that .#{$vt-namespace}__container { $vt-namespace seems undefined.
Changed the import variables to the following so that it will be able to find $vt-namespace
@use "vue-toastification/src/scss/_variables" as *;
However, for some reasons it's still not working.

Am I missing something ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants