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

Revert compound re-ordering for non extended selectors #3100

Merged

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented May 21, 2020

Tested against ruby sass 3.7.4 since this is still the compatibility goal for current libsass branch.

.red-icon {
    color: red;
}

a:before.nested {
    &.error {
      @extend .red-icon;
      qwe: asd;
    }
}

.red-icon {
    color: blue;
}

:before {
    &.red-icon2 {
        foo: bar;
    }
}

:before {
    &.red-icon {
        foo: baz;
    }
}

.asd#asd {
    &qwe {
        asd: qwe;
    }
}

:before {
    &.qwe#{&} {
        asd: qwe;
    }
}

a :before.baz {a: b}
:foo {@extend .baz}

Expected output as from ruby sass and previous libsass:

.red-icon, a.nested.error:before {
  color: red; }

a:before.nested.error {
  qwe: asd; }

.red-icon, a.nested.error:before {
  color: blue; }

:before.red-icon2 {
  foo: bar; }

:before.red-icon, a.nested.error:before {
  foo: baz; }

.asd#asdqwe {
  asd: qwe; }

:before.qwe:before {
  asd: qwe; }

a :before.baz, a :foo:before {
  a: b; }

Output by dart sass which differs from ruby sass and previous libsass:

.red-icon, a:before.nested.error {
  color: red;
}

a:before.nested.error {
  qwe: asd;
}

.red-icon, a:before.nested.error {
  color: blue;
}

:before.red-icon2 {
  foo: bar;
}

:before.red-icon, a.nested.error:before {
  foo: baz;
}

.asd#asdqwe {
  asd: qwe;
}

:before.qwe:before {
  asd: qwe;
}

a :before.baz, a :foo:before {
  a: b;
}

@mgreter mgreter force-pushed the bugfix/revert-compound-re-order-non-extended branch from c0c34d3 to 5fe3e34 Compare May 21, 2020 04:17
@mgreter mgreter mentioned this pull request May 21, 2020
@mgreter mgreter force-pushed the bugfix/revert-compound-re-order-non-extended branch 2 times, most recently from 5080a27 to e90a9d2 Compare May 21, 2020 05:39
@mgreter mgreter self-assigned this May 21, 2020
@mgreter mgreter merged commit f4cd410 into sass:master May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant