operator - method

CssValue operator -(
  1. CssValue other
)

Returns a new CssValue with the difference between the numbers of this value and other.

Throws an error if the unit of this value and other do not match.

Implementation

CssValue operator -(CssValue other) {
  _checkMatchingUnits(other);
  return CssValue(number - other.number, unit);
}