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

unit lost when divise (or multiply) same units #2472

Closed
bassjobsen opened this issue Feb 24, 2015 · 2 comments
Closed

unit lost when divise (or multiply) same units #2472

bassjobsen opened this issue Feb 24, 2015 · 2 comments
Labels

Comments

@bassjobsen
Copy link
Contributor

test {
t1: (2em/1em) + 20;
t2: 20 + (2em/1em);
t3: 2em/1em;
t4: (2em/1px) + 20;
t5: 20 + (2em/1px);
t6: 2em/1px;
t7: (2em*1em) + 20;
t8: 20 + (2em*1em);
t9: 2em*1em;
t10: (2em*1px) + 20;
t11: 20 + (2em*1px);
t12: 2em*1px;
}

outputs:

test {
  t1: 22em;
  t2: 22;
  t3: 2em;
  t4: 22em;
  t5: 22em;
  t6: 2em;
  t7: 22em;
  t8: 22;
  t9: 2em;
  t10: 22em;
  t11: 22;
  t12: 2em;
}

The lost of units for t2 vs t5 and t8 vs t11 has already been described at #2471, but also t5 vs t11 seems unexpected.
Indeed mathematically em/em = 1 and em/px = ??, but with strict-units=off i expect both should be em.

@lukeapage
Copy link
Member

in 1.7.5 the output is

test {
  t1: 22em;
  t2: 22;
  t3: 2em;
  t4: 22em;
  t5: 22em;
  t6: 2em;
  t7: 22em;
  t8: 22em;
  t9: 2em;
  t10: 22em;
  t11: 22em;
  t12: 2em;
}

in 1.3.0 before strict math

test {
  t1: 22em;
  t2: 22em;
  t3: 2em;
  t4: 22em;
  t5: 22em;
  t6: 2em;
  t7: 22em;
  t8: 22em;
  t9: 2em;
  t10: 22em;
  t11: 22em;
  t12: 2em;
}

@lukeapage lukeapage added the bug label Feb 25, 2015
@seven-phases-max
Copy link
Member

+1.

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

No branches or pull requests

3 participants