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 (without: media) selector outside from wapper #1890

Closed
sou-lab opened this issue Jan 21, 2016 · 4 comments
Closed

@at-root (without: media) selector outside from wapper #1890

sou-lab opened this issue Jan 21, 2016 · 4 comments

Comments

@sou-lab
Copy link

sou-lab commented Jan 21, 2016

When use "@at-root (without: media)".
.box is outside from .wrap

.wrap {
  @media (min-width: 480px) { 
    display: block;
    @at-root (without: media){ 
      .box { 
        display: inline-block;
      }
    } 
  }
}

LibSass

@media (min-width: 480px) {
  .wrap {
    display: block;
  }
}

.box {
  display: inline-block;
}

Ruby Sass 3.4

@media (min-width: 480px) {
  .wrap {
    display: block;
  }
}
.wrap .box {
  display: inline-block;
}

Spec added sass/sass-spec#749

@sou-lab
Copy link
Author

sou-lab commented Jan 21, 2016

if .box at root

.wrap {
  @media (min-width: 480px) { 
    display: block;
    @at-root (without: media rule) {
    // or  @at-root (without: all) {
      .box { 
        display: inline-block;
      }
    } 
  }
}

@mgreter
Copy link
Contributor

mgreter commented Jan 21, 2016

This is basically a duplicate of #1661 and #1873

@mgreter mgreter modified the milestones: 3.3.4, 3.4 Jan 24, 2016
@mgreter mgreter self-assigned this Jan 24, 2016
@xzyfer xzyfer modified the milestone: 3.4 May 20, 2016
@xzyfer
Copy link
Contributor

xzyfer commented May 21, 2016

I've compared our at-root implementation with Ruby Sass. The at-root is being resolved correctly in this case. The problem here is that the .box selector is not fully resolved (parentized) in the expand/eval stage.

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2018

Related to #2444 and #1651

max-ch9i pushed a commit to max-ch9i/libsass that referenced this issue Dec 5, 2018
max-ch9i pushed a commit to max-ch9i/sass-spec that referenced this issue Dec 6, 2018
xzyfer pushed a commit to sass/sass-spec that referenced this issue Dec 6, 2018
* Move 1890 to closed

Resolves: sass/libsass#1890

* Add ruby-sass test

* Remove libsass specific output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants