CanonicalizeContext

Contextual information passed to canonicalize and findFileUrl. Not all importers will need this information to resolve loads, but some may find it useful.

Hierarchy

  • CanonicalizeContext

Properties

containingUrl: null | URL

The canonical URL of the file that contains the load, if that information is available.

For an Importer, this is only passed when the url parameter is a relative URL or when its URL scheme is included in nonCanonicalScheme. This ensures that canonical URLs are always resolved the same way regardless of context.

For a FileImporter, this is always available as long as Sass knows the canonical URL of the containing file.

fromImport: boolean

Whether this is being invoked because of a Sass @import rule, as opposed to a @use or @forward rule.

This should only be used for determining whether or not to load import-only files.