$primary-color = #333;
@primary-color: #333;
$primary-color: #333;
--primary-color: #333;
增加选择器权重
减少样式表体积
增强代码的层级表达与可读性
自动添加前缀
@include button-style();
@use button-style;
@extend button-style;
@apply button-style();
调用函数
应用 mixin
继承另一个选择器的样式
定义变量
无法导入变量
会造成样式重复与全局污染
只能导入 CSS 文件
不支持嵌套规则
SCSS 内置函数
了解 SCSS 的最新内置函数,远离过时 API,提升你的样式编写效率和质量。
ESLint 是什么?
本文深入浅出介绍 ESLint 的作用、解决的问题、团队代码风格统一的重要性,以及 ESLint 与 Prettier 的区别和如何利用 ESLint 预防常见 Bug。
On this page