sass: Unitless values should not compare as equal to unitful values

(Edit after the fact by @nex3)

Tasks:

  • Deprecate existing behavior in stable.
  • Remove behavior from master.

I know the existing behavior was intentional, but it breaks the basic rules of math: if 1px == 1 and 1 == 1em, then 1px == 1em. That sounds like a bug to me. In CSS the actual unit or lack of unit is very important. I can’t think of any real use-case where I would be equally happy with or without a unit.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 26 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I can take it that unit/unitless operations remain a stable core behavior?

That’s correct. There are no plans to change anything but boolean operators (and so far, only ==).