class Sass::Script::Number

def legal_units?

Returns:
  • (Boolean) - Whether or not this number has units that can be represented in CSS
def legal_units?
  (numerator_units.empty? || numerator_units.size == 1) && denominator_units.empty?
end