dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.56k stars 381 forks source link

Incorrect compiling of selectors nested within :not pseudo class selector lists #783

Closed dotherightthing closed 2 years ago

dotherightthing commented 3 years ago

gulp-sass@4.0.2


Example 1

Source:

a:not(.single) {
    * {
        color: orange;
    }

    &.ignore {
        color: yellow;
    }
}

Expected & Actual CSS:

a:not(.single) * {
    color: orange;
}

a:not(.single).ignore {
    color: yellow;
}

Example 2

Source:

a:not(.single-with-property) {
    color: green;

    * {
        color: red;
    }

    &.ignore {
        color: green;
    }
}

Expected & Actual CSS:

a:not(.single-with-property) {
    color: green;
}

a:not(.single-with-property) * {
    color: red;
}

a:not(.single-with-property).ignore {
    color: green;
}

Example 3

Source:

a:not(.list-item-1, .list-item-2) {
    * {
        color: pink;
    }

    &.ignore {
        color: lightpink;
    }
}

Expected CSS:

a:not(.list-item-1):not(.list-item-2) * {
    color: pink;
}

a:not(.list-item-1):not(.list-item-2).ignore {
    color: lightpink;
}

Actual CSS:

a  * {
    color: pink;
}

a .ignore {
    color: lightpink;
}

Example 4

Source:

a:not(.list-item-1-with-property, .list-item-2-with-property) {
    color: lightgreen;

    * {
        color: darkgreen;
    }

    &.ignore {
        color: lightgreen;
    }
}

Expected CSS:

a:not(.list-item-1-with-property):not(.list-item-2-with-property) {
    color: lightgreen;
}

a:not(.list-item-1-with-property):not(.list-item-2-with-property) * {
    color: darkgreen;
}

a:not(.list-item-1-with-property):not(.list-item-2-with-property).ignore {
    color: lightgreen;
}

Actual CSS:

a:not(.list-item-1-with-property):not(.list-item-2-with-property) {
    color: lightgreen;
}

a  * {
    color: darkgreen;
}

a .ignore {
    color: lightgreen;
}
cpiber commented 3 years ago

gulp-sass is just a wrapper around node-sass, this is not an issue of this package

XhmikosR commented 2 years ago

@xzyfer this is unrelated to gulp-sass too.