Sha256: 5808904aa6936b788af6a2b63eec614a35f376777f9828a6f97a63e29980da25
Contents?: true
Size: 531 Bytes
Versions: 17
Compression:
Stored size: 531 Bytes
Contents
# # This module provides a set of Sass functions for working with Sass::Number # module Archetype::SassExtensions::Numbers # # remove the units from a number # # *Parameters*: # - <tt>$number</tt> {Number} the number to remove units from # *Returns*: # - {Number} the number without units # def strip_units(number) value = 0 value = number.value.to_f if number.is_a?(Sass::Script::String) value = number.value if number.is_a?(Sass::Script::Number) return Sass::Script::Number.new(value) end end
Version data entries
17 entries across 17 versions & 1 rubygems