Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Custom Mixins #960

@drewwells

Description

@drewwells

libsass has the ability to specify custom functions, but not custom mixins (that I'm aware of). Are there plans to enable specifying custom mixins?

I'm hacking custom mixins by either injecting mixins at the beginning of source string or using the custom importer interface. The second one is fine, but does require the developer to include special @import to enable the custom mixin.

Here's an example mixin that gets injected into the source:

@mixin sprite-dimensions($map, $name) {
  $file: sprite-file($map, $name);
  height: image-height($file);
  width: image-width($file);
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions