less.ruby icon indicating copy to clipboard operation
less.ruby copied to clipboard

Mixins do not work within media queries

Open simonsmith opened this issue 12 years ago • 1 comments

Hi,

This works as expected:

.test {
    color: #000;
}

.hello {
    .test;
}

However this:

@media only screen and (min-width: 42em) {
    .test {
        color: #000;
    }
}

.hello {
    .test;
}

does not.

Any thoughts?

Thanks!

simonsmith avatar Sep 26 '12 11:09 simonsmith

I ran into this issue a while back, I ended up flipping the code to accomodate for it.

.tablet {
    .hello{
        .test {
           color: #000;
        }
    }
}
@media only screen and (min-width: 42em) {
  .tablet;
}


blowsie avatar Feb 12 '13 15:02 blowsie