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. Leetcode-SQL学习计划-SQL入门-1527.患某种疾病的患者【regexp正则表达式匹配】

    链接:https://leetcode.cn/problems/patients-with-a-condition/ -- 1527.患某种疾病的患者 -- 链接:https://leetcode.c ...

  2. java (String)强制转换与toString()方法

    1. Object.toString()介绍 Object中是自带有toString()方法的,也就是说java中的所有类的对象都是可以转换为字符串的. 首先,先看看Object.toString() ...

  3. jQuery类库

    jQuery介绍 1. jQuery是一个轻量级的.兼容多浏览器的JavaScript库. 2. jQuery使用户能够更方便地处理HTML Document.Events.实现动画效果.方便地进行A ...

  4. python 之字符串的使用

    在python中,字符串是最常用的数据类型,通常由单引号(' ').双引号(" ").三重引号(''' ''',""" ""&qu ...

  5. [常用工具] mermaid学习笔记

    mermaid是一个基于Javascript的图表绘制工具,类似markdown用文本语法,用于描述文档图形(流程图. 时序图.甘特图),开发者可以通过一段mermaid文本来生成SVG或者PNG形式 ...

  6. 2022CSP-J线上游记

    写在前面 安徽CSP取消了-- 去年CSP考炸的我本来想今年一雪前耻(bushi),结果-- T1 第一题大毒瘤! 首先观察数据可以分类如下两种情况: \(a = 1\) 直接输出\(1\),retu ...

  7. python数据分析与可视化【思维导图】

    python数据分析与可视化常用库 numpy+matplotlib+pandas 思维导图 图中难免有错误,后期随着学习与应用的深入,会不断修改更新. 当前版本号:1.0 numpy介绍 NumPy ...

  8. python之路28 网络编程基础之OSI七层协议模型

    OSI七层协议 """ 七层模型,亦称OSI(Open System Interconnection).参考模型是国际标准化组织(ISO)制定的一个用于计算机或通信系统间 ...

  9. [WPF]鼠标移动到Button颜色改变效果设置

    代码 <Style x:Key="Button_Menu" TargetType="{x:Type Button}"> <Setter Pro ...

  10. [cocos2d-x]关于3.x的触摸机制

    触摸机制的概念 通过对要监听触摸的节点进行注册,然后自定义相应的触摸函数,由事件监听器实现对触摸的监听并且实现相应的响应动作. 触摸的分类 单点触摸 下面是实现单点触摸监听的步骤: //第一步:先创建 ...