我在构建系统中使用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属性应用于所有这些元素? (我显然不想将属性选择器应用于select
和textarea
,但如果没有两个具有重复属性的独立选择器,则不确定如何做到这一点?)
答案 0 :(得分: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;
}