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

scale_color

scale_color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha]) Fluidly scales one or more properties of a color. Unlike adjust-color, which changes a color’s properties by fixed amounts, scale-color fluidly changes them based on how high or low they already are. That means that lightening an already-light color with scale-color won’t change the lightness much, but lightening a dark color by the same amount will change it more dramatically. This has the benefit of making

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

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

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

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

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

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

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