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

Custom Function to import additional Less from PHP method? #2

Description

@thebeline

I can see in the documentation that you can register custom functions:

$less->registerFunction("double", function($arg) {
    list($type, $value, $unit) = $arg;
    return array($type, $value*2, $unit);
});

Awesome! What I am looking to do is to either extend the existing @import or to make a new, custom, function that operates in a similar way, but loads the data from a PHP function. Is this possible?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions