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

Update the interpolation-operators-precedence spec #940

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Oct 7, 2016

This updates the interpolation-operators-precedence to match the
behaviour expected by sass/sass#2160.

This will need a sanity check by @nex3

This spec were generated with sass/sass#2163 applied to sass#stable

@xzyfer
Copy link
Contributor Author

xzyfer commented Oct 7, 2016

LibSass will currently fail this spec

@xzyfer xzyfer force-pushed the feat/interpolation-operators-precedence-spec branch 2 times, most recently from c96ef22 to 44a376a Compare October 8, 2016 04:34
This updates the interpolation-operators-precedence to match the
behaviour expected by sass/sass#2160.

This will need a sanity check by @nex3
@mgreter
Copy link
Contributor

mgreter commented Oct 20, 2016

FWIW I lately used this test to try to get libsass in line with ruby sass:

tst {
  a01: (#{a} - 5% / 2);
  a11: (#{a} + 5% / 2);
  a02: (#{a} -5% / 2);
  a12: (#{a} +5% / 2);
  a03: (#{a}-5% / 2);
  a13: (#{a}+5% / 2);
  b01: (a - 5% / 2);
  b11: (a + 5% / 2);
  b02: (a -5% / 2);
  b12: (a +5% / 2);
  b03: (a-5px / 2);
  b13: (a+5px / 2);
}

tst {
  a01: (#{a} - 5.0% / 2);
  a11: (#{a} + 5.0% / 2);
  a02: (#{a} -5.0% / 2);
  a12: (#{a} +5.0% / 2);
  a03: (#{a}-5.0% / 2);
  a13: (#{a}+5.0% / 2);
  b01: (a - 5.0% / 2);
  b11: (a + 5.0% / 2);
  b02: (a -5.0% / 2);
  b12: (a +5.0% / 2);
  b03: (a-5.0% / 2);
  b13: (a+5.0% / 2);
}

tst {
  test-01: a #{5.0px / 2};
  test-02: a #{+5.0px / 2};
  test-03: a #{-5.0px / 2};
  test-04: #{+5.0px / 2};
  test-04: #{-5.0px / 2};
  test-04: #{5.0px / 2};
  test-04: #{a} -5.0px / 2;
}

tst {
  test-05: (a 5.0px / 2);
  test-06: (#{a} 9.0px / 2);
  test-0A: (5.0px / 2 a);
  test-07: (9.0px / 2 #{a});
  test-08: (9.0px / 2 #{a} 9.0px / 2);
  test-09: (a 5.0px / 2 #{a} 9.0px / 2);
  test-10: (a, 5.0px / 2 #{a} 5.0px / 2);

  test-11: (9.0px / 2 #{a} 9.0px / 2 #{a});
  test-12: (9.0px / 2 #{a} #{a} 9.0px / 2);
  test-13: (#{a} 9.0px / 2 #{a} 9.0px / 2);
  test-14: (#{a} 5.0px / 2 5.0px / 2 #{a});

  test-15: a 5.0px / 2;
  test-16: #{a} 9.0px / 2;
  test-17: 9.0px / 2 #{a};
  test-18: 9.0px / 2 #{a} 9.0px / 2;
  test-19: a 5.0px / 2 #{a} -9.0px / 2;
  test-20: a, 5.0px / 2 #{a} 5.0px / 2;

  test-21: 9.0px / 2 #{a} 9.0px / 2 #{a};
  test-22: 9.0px / 2 #{a} #{a} 9.0px / 2;
  test-23: #{a} 9.0px / 2 #{a} 9.0px / 2;
  test-24: #{a} 5.0px / 2 5.0px / 2 #{a};
}

ruby sass 3.4.22

tst {
  a01: a - 2.5%;
  a11: a + 2.5%;
  a02: a -2.5%;
  a12: a +2.5%;
  a03: a-2.5%;
  a13: a+2.5%;
  b01: a-2.5%;
  b11: a2.5%;
  b02: a -5%/2;
  b12: a2.5%;
  b03: a-5px/2;
  b13: a2.5px;
}

tst {
  a01: a - 2.5%;
  a11: a + 2.5%;
  a02: a -2.5%;
  a12: a +2.5%;
  a03: a-2.5%;
  a13: a+2.5%;
  b01: a-2.5%;
  b11: a2.5%;
  b02: a -5%/2;
  b12: a2.5%;
  b03: a-5 0%/2;
  b13: a2.5%;
}

tst {
  test-01: a 5px/2;
  test-02: a 5px/2;
  test-03: a -2.5px;
  test-04: 5px/2;
  test-04: -2.5px;
  test-04: 5px/2;
  test-04: a -5px/2;
}

tst {
  test-05: a 5px/2;
  test-06: a 4.5px;
  test-0A: 5px/2 a;
  test-07: 4.5px a;
  test-08: 4.5px a 4.5px;
  test-09: a 5px/2 a 4.5px;
  test-10: a, 5px/2 a 5px/2;
  test-11: 4.5px a 4.5px a;
  test-12: 4.5px a a 4.5px;
  test-13: a 4.5px a 4.5px;
  test-14: a 5px/2 5px/2 a;
  test-15: a 5.0px / 2;
  test-16: a 9px/2;
  test-17: 9px/2 a;
  test-18: 9px/2 a 9px/2;
  test-19: a 5px/2 a -9px/2;
  test-20: a, 5px/2 a 5px/2;
  test-21: 9px/2 a 9px/2 a;
  test-22: 9px/2 a a 9px/2;
  test-23: a 9px/2 a 9px/2;
  test-24: a 5px/2 5px/2 a;
}

@nex3
Copy link
Contributor

nex3 commented Jul 18, 2018

I believe these specs have been updated elsewhere.

@nex3 nex3 closed this Jul 18, 2018
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

Successfully merging this pull request may close these issues.

3 participants