value-keyword-case
キーワード値の小文字または大文字を指定します。
a { display: block; }
/** ↑
* These values */
このルールは、既知のプロパティの<custom-idents>
を無視します。プロパティに関連付けられていないキーワード値(例:$vars
およびカスタムプロパティ)で、プライマリオプションに準拠していないものは、ignoreKeywords: []
セカンダリオプションを使用して無視できます。
fix
オプションを使用すると、このルールによって報告されたすべての問題を自動的に修正できます。
message
セカンダリオプションは、このルールの引数を受け入れることができます。
オプション
string
: "lower"|"upper"
"lower"
次のパターンは問題と見なされます
a {
display: Block;
}
a {
display: bLoCk;
}
a {
display: BLOCK;
}
a {
transition: -WEBKIT-TRANSFORM 2s;
}
次のパターンは問題と見なされません
a {
display: block;
}
a {
transition: -webkit-transform 2s;
}
"upper"
次のパターンは問題と見なされます
a {
display: Block;
}
a {
display: bLoCk;
}
a {
display: block;
}
a {
transition: -webkit-transform 2s;
}
次のパターンは問題と見なされません
a {
display: BLOCK;
}
a {
transition: -WEBKIT-TRANSFORM 2s;
}
オプションのセカンダリオプション
ignoreKeywords: ["/regex/", /regex/, "non-regex"]
キーワード値の大文字と小文字を無視します。
例:"lower"
の場合。
例
["Block", "/^(f|F)lex$/"]
次のパターンは問題と見なされます
a {
display: bLoCk;
}
a {
display: BLOCK;
}
a {
display: fLeX;
}
a {
display: FLEX;
}
次のパターンは問題と見なされません
a {
display: block;
}
a {
display: Block;
}
a {
display: flex;
}
a {
display: Flex;
}
ignoreProperties: ["/regex/", /regex/, "non-regex"]
リストされたプロパティの値の大文字と小文字を無視します。
例:"lower"
の場合。
["/^(b|B)ackground$/", "display"];
次のパターンは問題と見なされます
a {
text-align: LEFT;
}
a {
text-align: Left;
}
次のパターンは問題と見なされません
a {
display: bloCk;
}
a {
display: BloCk;
}
a {
display: BLOCK;
}
a {
display: block;
}
a {
background: Red;
}
a {
Background: deepPink;
}
ignoreFunctions: ["/regex/", /regex/, "non-regex"]
リストされた関数の内部の値の大文字と小文字を無視します。
例:"upper"
の場合。
["/^(f|F)oo$/", "t"];
次のパターンは問題と見なされます
a {
display: b(inline);
}
a {
color: bar(--camelCase);
}
次のパターンは問題と見なされません
a {
display: t(flex);
}
a {
display: t(fLeX);
}
a {
color: t(--camelCase);
}
a {
color: foo(--camelCase);
}
a {
color: Foo(--camelCase);
}
camelCaseSvgKeywords: true | false
(デフォルト: false
)
true
の場合、このルールはプライマリオプションが"lower"
の場合、SVGキーワードがキャメルケースであることを期待します。
例:true
の場合
次のパターンは問題と見なされません
a {
color: currentColor;
}
次のパターンは問題と見なされます
a {
color: currentcolor;
}