Skip to content

Selectors inside mixin do not work #133

Description

@MaijaHeiskanen

Hi! I am updating postcss-mixins from 6.2.3 to 8.1.0, and noticed that if mixin has a selector inside it, it wont work anymore.

This:

@define-mixin svgicon-size-16 {
    height: 16px;
    width: 16px;
    stroke-width: .75px;

    .fill-notification-icon-line {
        stroke-width: 1.2px;
    }
    .stroke-notification-icon-line {
        stroke-width: 1px;
    }
}

.kanban-warning-icon {
    @mixin svgicon-size-16;
    flex: 0 0 16px;
    display: flex;
}

will become this:

.kanban-warning-icon {
    stroke-width: .75px;
    display: flex;
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
    .fill-notification-icon-line {
        stroke-width: 1.2px
    }
    .stroke-notification-icon-line {
        stroke-width: 1px
    }
}

which obviously wont work.

Is this a bug or something wrong with my config?

These are postcss packages in use (before updating):

"postcss": "8.3.5",
"postcss-color-function": "4.1.0",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-import": "14.0.2",
"postcss-mixins": "6.2.3",                // Updating to 8.1.0
"postcss-nested": "5.0.1",
"postcss-scss": "4.0.0",
"postcss-simple-vars": "6.0.2",

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions