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. SQL语句筛选/查询

    目录 SQL语句查询关键词 查询关键字之where筛选 查询关键字之分组 group by Group_concat 方法 查询关键字之having过滤 查询关键字之去重distinct 关键字之or ...

  2. 2022-6.824-Lab1:Map&Reduce

    lab 地址 : https://pdos.csail.mit.edu/6.824/labs/lab-mr.html 1. 介绍 准备工作 阅读 MapReduce 做什么 实现一个分布式的 Map ...

  3. 布尔值、元组、集合、input、格式化输出、赋值、运算符

    今日内容总结 目录 今日内容总结 数据类型之布尔值bool 数据类型之元组tuple 数据类型之集合set 与用户交互 1.获取输入: input 2.输出内部信息 3.在python2中与pytho ...

  4. cs231n__3. LostFunction

    CS231n 3.1 Lost Function 我们上次提到,要如何选择最优的W呢? 这就是要选择几种损失函数了. 我们要找到一种可行的方法来选择最优的W 先看简单的3个样本的例子 正式定义损失函数 ...

  5. Spark详解(07-1) - SparkStreaming案例实操

    Spark详解(07-1) - SparkStreaming案例实操 环境准备 pom文件 <dependencies>     <dependency>         &l ...

  6. SSM框架——Spring

    Spring 轻量级.非侵入式的框架 支持控制反转(IOC).面向切面编程(AOP) 支持事务的处理和声明.框架整合 1.HelloSpring(入门) 1.1导入依赖 <!-- https:/ ...

  7. LCA学习笔记(原洛谷文章)

    本文原发布时间:\(\texttt{2022-05-21 14:11:52}\) 简介 最经公共祖先 \(\operatorname{LCA}(a,b)=c\),指的是在一棵树上节点 \(a\) 与 ...

  8. linux环境编程(1): 实现一个单元测试框架

    写在前面 在开发的过程中,大多数人都需要对代码进行测试.目前对于c/c++项目,可以采用google的gtest框架,除此之外在github上搜索之后可以发现很多其他类似功能的项目.但把别人的轮子直接 ...

  9. Properties集合中的方法load-缓冲流的原理

    Properties集合中的方法load 参数:InputStream instream:字节输入流,不能读取含有中文的键值对Reader reader:字符输入流,能读取含有中文的键值对使用步骤:1 ...

  10. Java 进阶P-1.1+P-1.2

    用类制造对象 对象与类 对象是实体,需要被创建,可以为我们做事情 类是规范,根据类的定义来创建对象 对象=属性+服务 数据:属性或状态 操作:函数 从这些例子可以看出来 class是提供服务的,数据是 ...