Extending style in imported stylesheet isn't working
lucaseverett opened this issue · comments
If I try to @extend a style from a different style sheet using @import, I get an error: ".mainColor
, has not (yet) been defined, so cannot be extended." If I move the class to the same style sheet that the @extend is in it works.
Is this a known issue or am I doing something wrong?
.mainColor {
background-color: #444;
}
body {
@extend .mainColor;
}
That should only work if you apply postcss-import
before this plugin. Are you doing that?
Also, however, it looks like you are trying to extend a real selector instead of a placeholder. This simple-extend plugin only supports placeholders. If you would prefer more complex functionality, look to the plugin postcss-extend.
Thanks, David. After installing postcss-import it works as expected.