Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

a nested @import with an @if inside removes the nesting #49

Open
nex3 opened this issue Apr 11, 2018 · 0 comments
Open

a nested @import with an @if inside removes the nesting #49

nex3 opened this issue Apr 11, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@nex3
Copy link
Contributor

nex3 commented Apr 11, 2018

From sass/sass#2219:

Whenever you nest an @import and have @if in the root of the file it will lose its nesting.

index.scss

.nested {
  @import 'nesting';
}

_nesting.scss

@if true {
  .selector {
      color: #fff
  }
}

results into

.selector {
color: #fff;
}

This works though

& {
@if true {
  .selector {
      color: #fff
  }
}
}
@nex3 nex3 added the bug Something isn't working label Apr 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant