0

我在构建系统中使用 Sass-Lint 并Attribute-selector should be nested within its parent Type-selector在使用以下选择器时收到警告:

input[type='text'],
input[type='number'],
input[type='email'],
input[type='password'],
select,
textarea {
    color: gray;
}

如何更新它以防止警告消息,同时将 CSS 属性应用于所有这些元素?(我显然不想将属性选择器应用于selectand textarea,但不确定在没有两个具有重复属性的单独选择器的情况下如何做到这一点?)

4

1 回答 1

0

试试这个,希望会有所帮助。

// sass-lint:disable-block no-qualifying-elements force-attribute-nesting
input[type='text'],
input[type='number'],
input[type='email'],
input[type='password'],
select,
textarea {
    color: gray;
}
于 2017-11-14T15:27:06.440 回答