Skip to content

Compilation Errors

ECSS validates files at build time. Syntax errors and language-rule violations are printed to the terminal, and in Vite dev mode they are also shown as an overlay right in the browser. Each error reports its position in the [line:column] format.

Common situations

SituationHow to fix
A block, element, or enum name does not start with a capital letterUse PascalCase: Button, NavItem
@param comes after CSS rules or other directivesMove all @param declarations to the start of the block body
@element, @external, @if, or @debug at the top level of the fileThese directives are only allowed inside @block
@param inside @element or @externalParameters are declared only in the block itself
@elseif / @else without a preceding @ifA conditional chain starts with @if
An @enum value without quotes (values: sm, md;)Values are string literals: values: "sm", "md";
An unknown unit or uppercase letters in it (16PX)Use an allowed lowercase unit — see Data Types
An unknown @-ruleECSS allows a fixed set of at-rules — see Directives
A value not present in the @enum is compared in @ifOnly compare against the declared enum values

See also