
解决 stylelint 自动合并 top/bottom/left/right 为 inset
在 html 和 css 中,top、bottom、left 和 right 属性定义一个元素在页面或其父元素中的位置。为了简化代码,stylelint 提供了一个规则来自动将这四个属性合并为单个 inset 属性。然而,在某些情况下,用户可能希望禁止这种转换。
解决方法
要禁止 stylelint 将 top/bottom/left/right 属性合并为 inset,可以在 stylelint 规则中添加以下设置:
"declaration-block-no-redundant-longhand-properties": null
通过将此设置值设为 null,便可禁用该规则,从而防止 stylelint 自动转换这些属性。
以上就是如何禁止 Stylelint 将 top/bottom/left/right 属性合并为 inset?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号