class

Hwaro::Assets::Sass::Evaluator

Inherits Hwaro::Assets::Sass::Expr::Host / Reference / Object

Constants

DESCRIPTOR_AT_RULES = ["font-face", "page", "property", "counter-style", "font-palette-values", "viewport"] of ::String

At-rules whose body is a descriptor block: the declarations belong to the at-rule itself, so bubbling one out of a style rule must NOT wrap them in the parent selector.

This is a denylist on purpose. Everything else — @media, @supports, @layer, @container, @starting-style, and any at-rule newer than this compiler — is a grouping at-rule and keeps the selector. An allowlist silently dropped the selector for anything it hadn't heard of, emitting a selector-less declaration that browsers discard.

MAX_CALL_DEPTH = 100
MAX_INCLUDE_DEPTH = 100
MAX_PARENT_REF_SLOTS = 4

& slots per selector beyond which the parent cross-product is not expanded (it grows as parents**slots).

MAX_WHILE_ITERATIONS = 100000

Constructors

new(importer : Importer, path : String)
Source

Instance methods

evaluate(sheet : Ast::Stylesheet) : Array(Css::Node)
Source
seed_load_stack(canonical : String) : Nil

Registers the entry file's canonical path so a self-import cycle is caught at the first hop.

Source

Nested types