container-name-pattern
为容器名称指定模式。
¥Specify a pattern for container names.
@container foo (width > 400px) {}
/** ↑
* The pattern of this */
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
string
指定未用 "/"
括起来的正则表达式字符串。
¥Specify a regex string not surrounded with "/"
.
鉴于:
¥Given:
{
"container-name-pattern": "foo-.+"
}
以下模式被视为问题:
¥The following patterns are considered problems:
@container foo {}
a { container-name: bar; }
a { container: baz / inline-size; }
以下模式不被视为问题:
¥The following patterns are not considered problems:
@container foo-bar {}
a { container-name: foo-bar; }
a { container: foo-baz / inline-size; }