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

Incompatible units error for addition should not be raised when unit is divided out later #1792

Closed
andrew-skybound opened this issue Dec 18, 2015 · 1 comment · Fixed by #1876

Comments

@andrew-skybound
Copy link

Ruby SASS allows two values having complex units to be added or subtracted, so long as the units are divided out afterwards. It looks like Libsass does not allow this.

In the sample below, "test1" works fine but "test2" is an error in Libsass.

Input:

test {
    test1: (3px*4in) / 1in;
    test2: ((1px*2in) + (3px*4in)) / 1in;
}

Ruby SASS (3.4.19):

a {
  test1: 12px;
  test2: 14px;
}

Libsass (3.3.2-32-gb2a3):

Error: Incompatible units: ‘in*in’ and ‘in*px’.
        on line 3 of test.scss
>>  test2: ((1px*2in) + (3px*4in)) / 1in;
   ------^
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Dec 27, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Dec 27, 2015

Spec added sass/sass-spec#648

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.

2 participants