selector_nest

selector_nest($selectors...) Return a new selector with all selectors in $selectors nested beneath one another as though they had been nested in the stylesheet as $selector1 { $selector2 { ... } }. Unlike most selector functions, selector-nest allows the parent selector & to be used in any selector but the first. Examples: selector-nest(".foo", ".bar", ".baz") => .foo .bar .baz selector-nest(".a .foo", ".b .bar") => .a .foo .b .bar selector-nest(".foo", "&.bar") => .foo.bar

selector_extend

selector_extend($selector, $extendee, $extender) Returns a new version of $selector with $extendee extended with $extender. This works just like the result of $selector { ... } $extender { @extend $extendee } Examples: selector-extend(".a .b", ".b", ".foo .bar") => .a .b, .a .foo .bar, .foo .a .bar Returns A list of lists of strings representing the result of the extension. This is in the same format as a selector returned by &. Parameters: $selector (String, List) — The sele

selector_append

selector_append($selectors...) Return a new selector with all selectors in $selectors appended one another as though they had been nested in the stylesheet as $selector1 { &$selector2 { ... } }. Examples: selector-append(".foo", ".bar", ".baz") => .foo.bar.baz selector-append(".a .foo", ".b .bar") => "a .foo.b .bar" selector-append(".foo", "-suffix") => ".foo-suffix" Returns A list of lists of strings representing the result of appending $selectors. This is in the same forma

saturation

saturation($color) Returns the saturation component of a color. See the CSS3 HSL specification. Calculated from RGB where necessary via this algorithm. Parameters: $color (Color) Returns: (Number) — The saturation component, between 0% and 100% Raises: (ArgumentError) — if $color isn’t a color

round

round($number) Rounds a number to the nearest whole number. Examples: round(10.4px) => 10px round(10.6px) => 11px Parameters: $number (Number) Returns: (Number) Raises: (ArgumentError) — if $number isn’t a number

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

random

random random($limit) Overloads: random Return a decimal between 0 and 1, inclusive of 0 but not 1. Returns: (Number) — A decimal value. random($limit) Return an integer between 1 and $limit, inclusive of both 1 and $limit. Parameters: $limit (Number) — The maximum of the random integer to be returned, a positive integer. Returns: (Number) — An integer. Raises: (ArgumentError) — if the $limit is not 1 or greater

red

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

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

rgba

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