module

Hwaro::Assets::Sass

Constants

BUILTIN_MODULES = begin modules = {} of String => SassModule Builtins::MODULE_TABLES.each do |name, tables| fns, vars = tables functions = {} of String => SassFn fns.each do |fn_name, fn| functions[fn_name] = fn end modules[name] = SassModule.new(vars.dup, {} of String => MixinClosure, functions) end modules end

sass:math / sass:string / ... resolved by @use "sass:...". Built eagerly at startup (thread-safe under -Dpreview_mt) and shared as singletons — module-identity checks rely on that.

Class methods

compile(source : String, path : String = "(inline)", loader : Loader = FileLoader.new, root : String = Dir.current) : String

Compiles SCSS source to expanded CSS. path is used for error locations and as the base for @use/@import resolution; root bounds import resolution to the project directory. Raises Sass::SyntaxError — build-facing callers convert it to a classified HwaroError.

Source
normalize_ident(name : String) : String

Sass treats - and _ as interchangeable in identifiers (variables, mixins, namespaces — not selectors). All identifier storage and lookup normalizes to the hyphen form so $brand-color and $brand_color resolve to the same variable.

Source

Nested types