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)
Links to this issue
Commits related to this issue
- Deprecate unitless numbers equaling unitful numbers. See #1496 — committed to sass/sass by nex3 10 years ago
- Remove unit from $number in anticipation of a planned deprecation https://github.com/sass/sass/issues/1496 — committed to dwayne-roberts/beauty-case by deleted user 9 years ago
- Deprecate 1em != 1 as well. See #1496 — committed to sass/sass by nex3 9 years ago
- Unitless numbers no longer equal numbers with units. Closes #1496 — committed to sass/sass by nex3 7 years ago
- Unitless numbers no longer equal numbers with units. Closes #1496 — committed to sass/sass by nex3 7 years ago
- Update unitless equality tests for Ruby Sass. See sass/sass#1496 — committed to sass/sass-spec by nex3 7 years ago
- Unitless numbers no longer equal numbers with units. (#2318) Unitless numbers no longer equal numbers with units. Closes #1496 — committed to sass/sass by nex3 7 years ago
- Update unitless equality tests for Ruby Sass. (#1146) See sass/sass#1496 — committed to sass/sass-spec by nex3 7 years ago
That’s correct. There are no plans to change anything but boolean operators (and so far, only
==
).