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

[sass-convert] Multiple parent selectors with double-colon pseudoelements problem #281

Closed
reinmarm opened this issue Feb 17, 2012 · 0 comments

Comments

@reinmarm
Copy link

Conversion from CSS to .sass/.scss produces wrong output when sass-convert combines a parent selector with double-colon-notation (CSS3) pseudoelements via &. This only occurs when there are more than one selectors with pseudoelements. See my example with the aelement below.

Result:

  1. The parent::pseudoelement selectors appear one level too deep.
  2. One colon gets stripped, resulting in parent:pseudoelement.
  3. At the level where they should be, a lone &: appears, throwing Syntax error: Invalid CSS after "&:": expected pseudoclass or pseudoelement, was "" when trying to compile back to CSS.
/* input.css */

a {
    color: #111;
}
a::foo,
a::bar {
    color: #222;
}

b {
    color: #111;
}
b:foo,
b:bar {
    color: #222;
}

p {
    color: #111;
}
p::foo {
    color: #222;
}
/* output.sass */

// double-colon notation, more than one selector: wrong
a
  color: #111
  &:
    &:foo, &:bar
      color: #222

// single-colon notation: as expected
b
  color: #111
  &:foo, &:bar
    color: #222

// double-colon notation, but only one selector: also as expected
p
  color: #111
  &::foo
    color: #222
@nex3 nex3 closed this as completed in 1cbf18c Feb 18, 2012
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

2 participants