Scss/Sass 项目里使用 / 报错:Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.。指的是不能直接使用 / 来进行相除,已经在 Sass 2.0.0 版本被弃用。

可以降低版本,但可能会失去一些好用的特性,不推荐。如果你是 Vite 项目,可以按照以下步骤来:

  1. 引入 sass:math:
// vite.config.ts

// css 预处理
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "sass:math";`
}
}
}
  1. 把 / 的地方改成 math.div(1, 1)
.example {
top: $show-top + $i * math.div(($close-end - $show-top), 10);
}

也可以使用 calc 来代替 math.div/ 斜杠。网上也有说安装 sass-migrator 对 node_modules 进行配置的,我已经试验过了,没有任何效果。这是 Sass 官方对该问题的解释:Breaking Change: Slash as Division

Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.的更多相关文章

  1. 解决 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

    转载 php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql ext ...

  2. 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

    php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extens ...

  3. 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

    php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extens ...

  4. 解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future

    今天使用了mysql 5.5版本,就出现了错误.错误提示如下: Deprecated: mysql_connect(): The mysql extension is deprecated and w ...

  5. 错误Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

    今天写PHP代码,遇到了这个非常不友好的报错(Deprecated: mysql_connect(): The mysql extension is deprecated and will be re ...

  6. pandas 使用panel 报错 Panel is deprecated and will be removed in a future version.

    Panel is deprecated and will be removed in a future version.The recommended way to represent these t ...

  7. Navigator is deprecated and has been removed from this package

    报错:'Navigator is deprecated and has been removed from this package. It can now be installed ' +     ...

  8. [mysql] mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

    From: http://www.ttlsa.com/php/deprecated-mysql-connect/ php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5 ...

  9. Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO

    你有碰上过这样的提示吗? Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in t ...

  10. 报错:'Navigator is deprecated and has been removed from this package. It can now be installed

    报错:'Navigator is deprecated and has been removed from this package. It can now be installed ' +     ...

随机推荐

  1. python算法初步(一)

    python算法初步(一) 冒泡排序 时间效率O(n²)原理:依次比较相邻两个位置的元素大小,然后按照要求交换位置. #从中选出一个数据(作为最小数据),然后和其他的数据依次比较,如果有更小的数据,那 ...

  2. C# 操作IIS加强版(添加,删除,启动,暂停网站,默认页,绑定信息)

    C# 操作IIS加强版(添加,删除,启动,暂停网站,默认页,绑定信息) 主要功能如下 在本机的IIS创建Web网站 删除网站包括应用程序池 删除应用程序池 添加默认文档 删除默认文档 添加虚拟目录 删 ...

  3. C++11(列表初始化+变量类型推导+类型转换+左右值概念、引用+完美转发和万能应用+定位new+可变参数模板+emplace接口)

    列表初始化 用法 在C++98中,{}只能够对数组元素进行统一的列表初始化,但是对应自定义类型,无法使用{}进行初始化,如下所示: // 数组类型 int arr1[] = { 1,2,3,4 }; ...

  4. Spring中使用@RequestBody注解接收的实体类中的某些参数为null

    1.问题描述 我写完一个接口,在用postman测试的时候,发现其中有一个参数cEnterpriseId明明是有值的,但接口controller接收到的该参数为null,但其他参数都不为null的. ...

  5. [LeetCode]226.翻转二叉树——递归遍历交换孩子

    题目   翻转一棵二叉树. 4 / \ 2 7 / \ / \ 1 3 6 9 //转换为: 4 / \ 7 2 / \ / \ 9 6 3 1 代码 TreeNode* invertTree(Tre ...

  6. BBS项目功能编写逻辑思路汇总

    BBS项目功能编写逻辑思路汇总 一.BBS创数据表 二.BBS注册功能 三.BBS登录功能 四.BBS首页搭建 五.BBS修改密码 六.BBS个人站点 七.BBS文章详情 八.BBS导入模块 九.BB ...

  7. [数据结构]KMP算法(含next数组详解)

    字符串匹配问题 给定一个字符串 s 和一个要匹配的模式串 p.模式串 p 有可能在 s 中多次出现,请求出模式串 p 在 s 中所有出现的起始位置. 暴力匹配算法 BF 算法思路 在面对字符串匹配问题 ...

  8. JS循环类数组对象,获得页面所有的某个ClssaName,处理它的属性

    举例:获得所有的某个ClssaName,处理它的第一个子元素中的title赋值给内容 let links = Array.from(document.getElementsByClassName('m ...

  9. 用XAMPP搭建本地:Web服务器,访问服务器,下载服务器。

    用XAMPP搭建本地:Web服务器,访问服务器,下载服务器. 首先需要下载XAMPP,链接为:XAMPP下载地址,XAMPP中文网. 下载完成后进行安装,直接一键点到底. 一.如何确定我们安装完成了? ...

  10. 转载:SQL分页查询总结

    [转载]SQL分页查询总结 开发过程中经常遇到分页的需求,今天在此总结一下吧.    简单说来方法有两种,一种在源上控制,一种在端上控制.源上控制把分页逻辑放在SQL层:端上控制一次性获取所有数据,把 ...