コンテンツにスキップ

noValueAtRule

このコンテンツはまだ日本語訳がありません。

Diagnostic Category: lint/nursery/noValueAtRule

Since: v1.8.0

Disallow use of @value rule in css modules.

Use of CSS variables is recommended instead of @value rule.

@value red: #FF0000;
code-block.css:1:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

@value at-rule is not a standard CSS feature.

> 1 │ @value red: #FF0000;
^^^^^
2 │

You can enable @value at-rule parsing by setting the css.parser.cssModules option to true in your configuration file.

:root {
--red: #FF0000
}
p {
background-color: var(--red);
}