unique_id

unique_id Returns a unique CSS identifier. The identifier is returned as an unquoted string. The identifier returned is only guaranteed to be unique within the scope of a single Sass run. Returns: (String)

hsl

hsl($hue, $saturation, $lightness) Creates a Color from hue, saturation, and lightness values. Uses the algorithm from the CSS3 spec. Parameters: $hue (Number) — The hue of the color. Should be between 0 and 360 degrees, inclusive $saturation (Number) — The saturation of the color. Must be between 0% and 100%, inclusive $lightness (Number) — The lightness of the color. Must be between 0% and 100%, inclusive Returns: (Color) Raises: (ArgumentError) — if $saturation or $l

@function

Function Directives It is possible to define your own functions in sass and use them in any value or script context. For example: $grid-width: 40px; $gutter-width: 10px; @function grid-width($n) { @return $n * $grid-width + ($n - 1) * $gutter-width; } #sidebar { width: grid-width(5); } Becomes: #sidebar { width: 240px; } As you can see functions can access any globally defined variables as well as accept arguments just like a mixin. A function may have several statements contained within

saturate

saturate($color, $amount) Makes a color more saturated. Takes a color and a number between 0% and 100%, and returns a color with the saturation increased by that amount. Examples: saturate(hsl(120, 30%, 90%), 20%) => hsl(120, 50%, 90%) saturate(#855, 20%) => #9e3f3f Parameters: $color (Color) $amount (Number) — The amount to increase the saturation by, between 0% and 100% Returns: (Color) Raises: (ArgumentError) — if $amount is out of bounds, or either parameter is th

blue

blue($color) Gets the blue component of a color. Calculated from HSL where necessary via this algorithm. Parameters: $color (Color) Returns: (Number) — The blue component, between 0 and 255 inclusive Raises: (ArgumentError) — if $color isn’t a color

zip

zip($lists...) Combines several lists into a single multidimensional list. The nth value of the resulting list is a space separated list of the source lists’ nth values. The length of the resulting list is the length of the shortest list. Examples: zip(1px 1px 3px, solid dashed solid, red green blue) => 1px solid red, 1px dashed green, 3px solid blue Parameters: $lists ([Base]) Returns: (List)

rgb

rgb($red, $green, $blue) Creates a Color object from red, green, and blue values. Parameters: $red (Number) — The amount of red in the color. Must be between 0 and 255 inclusive, or between 0% and 100% inclusive $green (Number) — The amount of green in the color. Must be between 0 and 255 inclusive, or between 0% and 100% inclusive $blue (Number) — The amount of blue in the color. Must be between 0 and 255 inclusive, or between 0% and 100% inclusive Returns: (Color) Raise

unit

unit($number) Returns the unit(s) associated with a number. Complex units are sorted in alphabetical order by numerator and denominator. Examples: unit(100) => "" unit(100px) => "px" unit(3em) => "em" unit(10px * 5em) => "em*px" unit(10px * 5em / 30cm / 1rem) => "em*px/cm*rem" Parameters: $number (Number) Returns: (String) — The unit(s) of the number, as a quoted string Raises: (ArgumentError) — if $number isn’t a number

join

join($list1, $list2, $separator:auto) Joins together two lists into one. Unless $separator is passed, if one list is comma-separated and one is space-separated, the first parameter’s separator is used for the resulting list. If both lists have fewer than two items, spaces are used for the resulting list. Like all list functions, join() returns a new list rather than modifying its arguments in place. Examples: join(10px 20px, 30px 40px) => 10px 20px 30px 40px join((blue, red), (#abc, #def

to_upper_case

to_upper_case($string) Converts a string to upper case. Examples: to-upper-case(abcd) => ABCD Parameters: $string (String) Returns: (String) Raises: (ArgumentError) — if $string isn’t a string