Skip to main content

selector-type-case

指定类型选择器的小写或大写。

¥Specify lowercase or uppercase for type selectors.

    a {}
/** ↑

* This is type selector */

fix 选项 可以自动修复此规则报告的所有问题。

¥The fix option can automatically fix all of the problems reported by this rule.

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

"lower"

{
"selector-type-case": "lower"
}

以下模式被视为问题:

¥The following patterns are considered problems:

A {}
LI {}

以下模式不被视为问题:

¥The following patterns are not considered problems:

a {}
li {}

"upper"

{
"selector-type-case": "upper"
}

以下模式被视为问题:

¥The following patterns are considered problems:

a {}
li {}

以下模式不被视为问题:

¥The following patterns are not considered problems:

A {}
LI {}

可选的辅助选项

¥Optional secondary options

ignoreTypes

{ "ignoreTypes": ["array", "of", "types", "/regex/"] }

鉴于:

¥Given:

{
"selector-type-case": [
"lower",
{ "ignoreTypes": ["$childClass", "/(p|P)arent.*/"] }
]
}

以下模式不被视为问题:

¥The following patterns are not considered problems:

myParentClass {
color: pink;
}

$childClass {
color: pink;
}