0

I'm converting my CSS stylesheet to SASS

However I have a problem with using placeholders and mixins together, the compiler complains. In the example below, I'm trying to use the %fullwidth placeholder in the media query mixin.

This does not seem logical, is there a way around this or would I have to type the CSS out manually ?

Ps I have searched other threads but I couldn't get my head around this, any help is appreciated

%fullwidth {        // place holder
  width: 100% 
}
-

body {
  background-color: #00000D;
  font-family: $robotofont;

  @include mobile {   // Mixin for media query min-width 250px 
    font-size: 60%;
    @extend fullwidth;  // causes an ERROR

  }

}

stckpete
  • 571
  • 1
  • 4
  • 13

2 Answers2

3

I believe you're just missing the % in the extend call, i.e. @extend %fullwidth;

Steve
  • 380
  • 1
  • 9
0

Extending selectors (including placeholders) outside of a media query is currently unsupported in Sass (as of version 3.14.3) and I don't think ever will be.

Also, you are missing the % when extending, but it still will not work.

Ben
  • 5,117
  • 2
  • 27
  • 26