nutui icon indicating copy to clipboard operation
nutui copied to clipboard

[FR]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

Open SpaceChars opened this issue 6 months ago • 0 comments

NutUI 包名

@nutui/nutui

这个功能解决了什么问题?

Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

现在使用的是@import 导入模块,但是sass 3.0后使用的是@use导入模块

  1. @import 语法并不能很好控制验证模块权限(参考sass官网)
  2. @import导致项目在使用@use导入组件的index.scss文件时,获取不到变量,因为组件的index.scss文件没有导入全局变量

你期望的组件设计是怎样的?

建议考虑升级下sass版本,使用新的语法;

升级新版本后对定制主题将会变的更简便

升级后,组件的index.scss也应使用@use 导入全局变量文件,避免样式模块获取不到变量的问题

SpaceChars avatar Jun 24 '25 03:06 SpaceChars