Skip to content

Invalid CSS output when using interpolation with mixins #486

@Jasonkoolman

Description

@Jasonkoolman

Consider the following SCSS code:

@mixin set-border($width) {
    border: $width solid #000;
}

.element {
    @include set-border(2px); // compiles to "2px solid #000"
}

Now using interpolation:

.element {
    @include set-border(#{2px + 2px}); // compiles to "4pxsolid #000"
}

Notice that there is no whitespace between the border width and style declaration.

Hoping this is an easy fix. Thanks in advance 👍

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions