Skip to content

@while doesn't work in @content block #121

@sergeylukin

Description

@sergeylukin

Similar to #120 with an exception that this code doesn't compile at all (ends up with Allowed memory size exhausted fatal error):

@mixin respond-to($media) {
  // ..strip $media conditional logic for the sake of simplicity
  @content;
}

@include respond-to(handhelds) {
  $i: 1;
  @while $i <= 2 {
    .grid-#{$i} { width: 100%; }
    $i: $i + 1;
  }
}

Expected output is:

.grid-1 {
  width: 100%; }

.grid-2 {
  width: 100%; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions