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

multiple comma-delimited selectors having nested &:nth-*(n) outputs multiple n inside parenthesis #1908

Closed
opeologist opened this issue Feb 4, 2016 · 1 comment

Comments

@opeologist
Copy link

looks like libsass 3.3.3 is introducing a weird error with &:nth-child/&:nth-of-type selectors inside of comma-delimited parents. example below:

test.scss:

html,
body {
  &:nth-child(2) {
    background: #f00;
  }
}

test.css should be:

html:nth-child(2),
body:nth-child(2) {
  background: #f00;
}

libsass v3.3.3 with node-sass v3.5.0-beta.1 compiles to test.css:

html:nth-child(2, 2),
body:nth-child(2, 2) {
  background: #f00;
}

the additional numbers inside the parenthesis seems to be directly affected by how many parent selectors are comma delimited.

eg: test.scss:

html,
body,
h1 {
  &:nth-child(2) {
    background: #f00;
  }
}

test.css:

html:nth-child(2, 2, 2),
body:nth-child(2, 2, 2),
h1:nth-child(2, 2, 2) {
  background: #f00;
}
@opeologist
Copy link
Author

just realized #1901 is the same issue. closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant