function-name-case
指定函数名称的小写或大写。
¥Specify lowercase or uppercase for function names.
a { width: calc(5% - 10em); }
/** ↑
* This function */
驼峰式大小写函数名称,例如 使用 lower
选项时会考虑 translateX
。
¥Camel case function names, e.g. translateX
, are accounted for when the lower
option is used.
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
string
:"lower"|"upper"
"lower"
以下模式被视为问题:
¥The following patterns are considered problems:
a {
width: Calc(5% - 10em);
}
a {
width: cAlC(5% - 10em);
}
a {
width: CALC(5% - 10em);
}
a {
background: -WEBKIT-RADIAL-GRADIENT(red, green, blue);
}
以下模式不被视为问题:
¥The following patterns are not considered problems:
a {
width: calc(5% - 10em);
}
a {
background: -webkit-radial-gradient(red, green, blue);
}
"upper"
以下模式被视为问题:
¥The following patterns are considered problems:
a {
width: Calc(5% - 10em);
}
a {
width: cAlC(5% - 10em);
}
a {
width: calc(5% - 10em);
}
a {
background: -webkit-radial-gradient(red, green, blue);
}
以下模式不被视为问题:
¥The following patterns are not considered problems:
a {
width: CALC(5% - 10em);
}
a {
background: -WEBKIT-RADIAL-GRADIENT(red, green, blue);
}
可选的辅助选项
¥Optional secondary options
ignoreFunctions: ["/regex/", /regex/, "non-regex"]
忽略函数名称的大小写。
¥Ignore case of function names.
例如,"lower"
。
¥For example, with "lower"
.
鉴于:
¥Given:
["--some-function", "/^--get.*$/"]
以下模式被视为问题:
¥The following patterns are considered problems:
a {
color: --sOmE-FuNcTiOn();
}
a {
color: --GetColor();
}
a {
color: --GET_COLOR();
}
以下模式不被视为问题:
¥The following patterns are not considered problems:
a {
display: --some-function();
}
a {
display: --getColor();
}
a {
display: --get_color();
}