postcss-extend icon indicating copy to clipboard operation
postcss-extend copied to clipboard

Wrong output with postcss-extend loaded before postcss-nested (as suggested by README.md)

Open andersk opened this issue 6 years ago • 0 comments

According to README.md:

Public Service Announcement: Because of an issue with postcss-nested, if you are trying to use both postcss-nested and this plugin, you need to use this plugin first.

However, (1) that issue has been closed, and (2) using postcss-extend first as suggested causes a different issue described in (the initial report of) #25:

Test postcss:

%testext { color: blue; }

.testrule
{
    &_subrule { @extend %testext; }
}

resulting css

&_subrule { color: blue; }

expected css

.testrule_subrule { color: blue; }

Putting postcss-nested before postcss-extend results in the expected CSS. (The remaining comments of #25 meander to a different issue that seems to have since been fixed, but this one remains.)

Should the README.md suggestion be reversed, or does this count as another bug in one of the plugins?

andersk avatar Aug 27 '19 22:08 andersk