peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

@extend only seems to work from current file #69

Closed coatesap closed 9 years ago

coatesap commented 9 years ago

Hi, can you confirm whether @extend only works on declarations in the current file?

The classic example that I can't seem to get to work would be:

@import "bootstrap.css";

#nav-main {
    ul {
        @extend .nav;
        @extend .navbar-nav;
    }
}
peteboere commented 9 years ago

It works cross file, though you can't extend a rule enclosed in a media query and expect predictable results.

Which I'm guessing is what is happening in your example since bootstrap uses media queries extensively.