LiveStyle.ShorthandBehavior.ForbidShorthands (LiveStyle v0.12.0)

View Source

Forbids disallowed shorthand properties at compile time.

This behavior raises compile-time errors for shorthand properties that are ambiguous or could cause cascade issues (like border, background, animation). Other shorthands like margin, padding pass through.

Error messages are defined in data/disallowed_shorthands.txt to keep the data centralized and easily maintainable.

Example

iex> ForbidShorthands.expand("margin", "10px")
[{"margin", "10px"}]

iex> ForbidShorthands.expand("border", "1px solid black")
** (ArgumentError) 'border' is not supported...