I use Compass to create my sprites and it works beautifully, but I came across one small annoyance. I cannot enable a separate sprite using the @include operator when inside another @include, for example, mixing mixing, which I usually use. My SCSS sprite looks like this:
.sp { background-repeat: no-repeat; overflow: hidden; line-height: 0; font-size: 0; text-indent: 100%; border: 0; } $sp-sprite-dimensions: true; $sp-sprite-base-class: '.sp'; $sprite-layout: smart; @import "sp/*.png"; @include all-sp-sprites;
Elsewhere, I'm trying to do this:
.logo { a { @include break($break1) { @include sp-sprite(logo-small); } } }
Nested @include statements are good with SCSS, but this does not allow @extend statements in @include statements, and apparently sprite @include generates an @extend statement behind the scenes, which I don't want. Does anyone know about this?
EDIT:
I was riveted to @lolmaus that the real problem is that I am placing an @extend inside a media query. I suppose this is forbidden, in any way around him?
source share