wix / stylable

Stylable - CSS for components
https://stylable.io
MIT License
1.27k stars 62 forks source link

fix: mixin of class from st-scope params #2853

Closed idoros closed 1 year ago

idoros commented 1 year ago

This PR fix a regression bug (worked in v4) that causes mixin that is defined as part of @st-scope params to be mixed incorrectly. The issue causes the original mixin class to be added as part of the selector instead of being replaced by the context selector.

For example:

@st-scope .mix {
    .x {}
}

.into {
    -st-mixin: mix;
}

/* should transforms into */
.into .x {}

/* but is incorrectly transformed into */
.into .mix .x {}