Skip to content

Mixin @content with embedded mixin test cases#87

Merged
robocoder merged 1 commit intoleafo:masterfrom
jamesshannon:content-mixins
May 17, 2013
Merged

Mixin @content with embedded mixin test cases#87
robocoder merged 1 commit intoleafo:masterfrom
jamesshannon:content-mixins

Conversation

@jamesshannon
Copy link
Contributor

@include with arguments inside of a @content block causes issues

I added a handful of test-cases with increasing complexity to show where things break. I initially thought that it was a problem with parent @content mixins that also have arguments, but it doesn't seem to be the case.

Embedded mixin arguments aren't passed. This:

@mixin cool($a, $b, $c) {
    height: $a + $b + $c;
}

@mixin content-simple {
    div.mixin-content-simple {
        @content;
    }
}

@include content-simple {
    @include cool(10px, 12px, 21px);
}

becomes

div.mixin-content-simple {
 height: ; }

cool is included just as in another test case, which works fine.

The problem popped up in the Inuit framework with the grid system being mixed in within a @media query mixin. I've given up on Foundation, so I'm sure I'll have a whole new group of issues... :)

For a background of @content mixins, see http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content

@Regaddi
Copy link

Regaddi commented Apr 16, 2013

Please fix this very soon!

Regaddi pushed a commit to Regaddi/scssphp that referenced this pull request Apr 24, 2013
robocoder added a commit that referenced this pull request May 17, 2013
@robocoder robocoder merged commit 2979b0d into leafo:master May 17, 2013
stilliard pushed a commit to WildfireInternet/scssphp that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants