Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@at-root inside Loops will be ignored #1285

Closed
gisu opened this issue Jun 19, 2015 · 3 comments
Closed

@at-root inside Loops will be ignored #1285

gisu opened this issue Jun 19, 2015 · 3 comments

Comments

@gisu
Copy link

gisu commented Jun 19, 2015

Found a Error with @at-root inside Loops.

.container {
  @for $i from 1 through 3 {
    @at-root .box-#{$i} {
      color: darken(red,($i * 5));
    }
  }

 // Control
 @at-root .outside-child {
   background-color: blue;
  }
}

Expected:

.box-1 {
  color: #e60000;
}
.box-2 {
  color: #cc0000;
}
.box-3 {
  color: #b30000;
}
.outside-child {
  background-color: blue;
}

Libsass (in my case the Gulp-Sass 2.0.1 but also tested with Libsass 3.2.5)

.container .box-1 {
  color: #e60000;
}
.container .box-2 {
  color: #cc0000;
}
.container .box-3 {
  color: #b30000;
}
.outside-child {
  background-color: blue;
}
@mgreter
Copy link
Contributor

mgreter commented Jun 23, 2015

This will be fixed once we release my latest refactoring for parser and at-root, which should have the first beta rounds in a few weeks (if everything goes as planned).

@mgreter mgreter added this to the 3.3 milestone Jun 23, 2015
@mgreter mgreter self-assigned this Jun 23, 2015
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Jun 29, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Jun 29, 2015

Specs added sass/sass-spec#420

@mgreter
Copy link
Contributor

mgreter commented Jul 13, 2015

We now have a passing spec test since #1249 was merged 🎈

@mgreter mgreter closed this as completed Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants