gpt4 book ai didi

CSS lint 抛出错误

转载 作者:行者123 更新时间:2023-11-28 03:21:21 25 4
gpt4 key购买 nike

我正在运行 lint 并收到以下错误。

Unexpected vendor-prefix "-webkit-animation" 

Unexpected named color "white"

这是我遇到错误的 css 类

.well-classname--progress {
-webkit-animation: loadbar 1s linear forwards;
animation: loadbar 1s linear forwards;
opacity: 0;
transform: translateX(-100%) translate3d(0, 0, 0);
// margin-right: 1px;
}

.well-classname--progress:not(:last-child) {
border-right: 1px solid white;
}

知道为什么我会收到这些 lint 错误吗?

最佳答案

Unexpected vendor-prefix "-webkit-animation"

这是 value-no-vendor-prefix stylelint 规则。

您可以使用 autoprefixer 避免包含供应商前缀的属性.

或者只是禁用此规则。

Unexpected named color "white"

这是 color-named规则设置为“从不”。

你可以将它设置为“always-where-possible”,如果你想总是使用命名颜色,可以将 white 替换为 #fff(首选)。

关于CSS lint 抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45196812/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com