sass-spec icon indicating copy to clipboard operation
sass-spec copied to clipboard

Refactor `@content` arguments specs

Open jathak opened this issue 4 years ago • 1 comments

jathak avatar Jun 05 '20 20:06 jathak

Hello,

I've come across an interesting case when compiling Bootstrap that may be relevant here.

The minimized version is

@mixin foo($arg) {
  @include bar {
    color: $arg;
  }
}

@mixin bar {
  @include baz {
    @content;
  }
}

@mixin baz {
  @content;
}

@mixin font-size($value) {
  @include foo($value);
}

a {
  @include font-size(1rem);
}

which I suppose can be thought of as a triple chain of @content.

connorskees avatar Jul 09 '20 21:07 connorskees