Give help. Get help.

  • # August 24, 2013 at 11:35 pm

    Hi everyone,

    I’m working to gain a better understanding of SCSS and I’ve run across an interesting quirk I’m having trouble with. I created the ‘clearfix’ as a placeholder like so:

    %clearfix:after {
      content: '';
      display: table;
      clear: both;

    …then tried to @extend it into some random class like this:

    .platypus {
      @extend clearfix;

    This didn’t work, and I’m kind of confused as to why not. Thoughts? Thanks!

    # August 24, 2013 at 11:51 pm

    should be

    @extend %clearfix
    # August 25, 2013 at 9:04 am

    Ha. Awesome. Derp.

    Not sure how I missed that one, thanks man!

    # August 25, 2013 at 11:11 am


    # September 3, 2013 at 12:50 pm


    From what I can tell it doesn’t matter if you do it your way or the way I originally posted it – the output seems to be the exact same. Your version does feel more semantic though, so I would suggest that version.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.