重大变化

新版本的 Sass 尽可能向后兼容,但有时需要进行重大更改。Sass 需要跟上不断发展的 CSS 规范,并且旧的语言设计错误有时需要修复。

在发布每个重大更改之前,Sass 实现将为行为将发生变化的样式表生成弃用警告。只要有可能,这些警告将包括有关如何更新已弃用样式以使其向前兼容的建议。

¥Before each breaking change is released, Sass implementations will produce deprecation warnings for stylesheets whose behavior will change. Whenever possible, these warnings will include suggestions for how to update the deprecated styles to make them forward-compatible.

不同的实现对于重大变更和弃用有不同的政策。Dart Sass 将在发布重大更改之前至少三个月发出弃用警告,并将使用新的主要版本号发布重大更改,除非该更改对于 CSS 兼容性是必要的。CSS 兼容性更改通常既无中断性又具有时间敏感性,因此它们可能会以新的次要版本号发布。

¥Different implementations have different policies for breaking changes and deprecations. Dart Sass will emit deprecation warnings for at least three months before releasing a breaking change, and will release the breaking change with a new major version number unless that change is necessary for CSS compatibility. CSS compatibility changes are often both non-disruptive and time-sensitive, so they may be released with new minor version numbers instead.

这些重大更改即将推出或最近已发布:

¥These breaking changes are coming soon or have recently been released:

提前选择加入提前选择加入 permalink

¥Early Opt-In

Dart Sass 用户可以选择尽早使用 --fatal-deprecation 命令行选项 将弃用视为错误。

¥Dart Sass users can opt in to treat deprecations as errors early using the --fatal-deprecation command line option.