2017-08-03 57 views
0

我在我的构建系统使用萨斯皮棉和我得到的警告Attribute-selector should be nested within its parent Type-selector使用以下选择时:如何在将CSS属性与选择和textarea一起应用于特定输入元素时防止“force-attribute-nesting”Sass-Lint警告?

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

这可怎么更新,以防止警告消息,但也适用的CSS属性所有这些元素? (我显然不想将属性选择器应用到selecttextarea,但不知道如何在没有两个单独的选择器的情况下如何做到这一点?)

回答

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; 
} 
相关问题