Skip to content

Lazy Input.css #1945

@nex3

Description

@nex3

I'm looking into sass/dart-sass#88, with the goal of exposing a PostCSS-compatible AST API (at least for statement-level AST nodes). One issue I'm running into is that Sass doesn't directly store the CSS text of the files it parses as a string. This means that creating a new Input object is relatively expensive, because we need to reconstruct the CSS file's text, even if the user is only ever accessing node.source.input.from as is reasonably common. It would be nice to have a way to make the css argument to new Input() be able to be lazy and only accessed when it's necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions