module Sass::Script # Methods in this module are accessible from the SassScript context. # For example, you can write # # !color = hsl(120, 100%, 50%) # # and it will call {Sass::Script::Functions#hsl}. # # The following functions are provided: # # \{#hsl} # : Converts an `hsl(hue, saturation, lightness)` triplet into a color. # # \{#percentage} # : Converts a unitless number to a percentage. # # \{#round} # : Rounds a number to the nearest whole number. # # \{#ceil} # : Rounds a number up to the nearest whole number. # # \{#floor} # : Rounds a number down to the nearest whole number. # # \{#abs} # : Returns the absolute value of a number. # # You can add your own functions to this module, # but there are a few things to keep in mind. # First of all, the arguments passed are {Sass::Script::Literal} objects. # Literal objects are also expected to be returned. # # Second, making Ruby functions accessible from Sass introduces the temptation # to do things like database access within stylesheets. # This temptation must be resisted. # Keep in mind that Sass stylesheets are only compiled once # at a somewhat indeterminate time # and then left as static CSS files. # Any dynamic CSS should be left in `