if

if($condition, $if-true, $if-false) Returns one of two values, depending on whether or not $condition is true. Just like in @if, all values other than false and null are considered to be true. Examples: if(true, 1px, 2px) => 1px if(false, 1px, 2px) => 2px Parameters: $condition (Base) — Whether the $if-true or $if-false will be returned $if-true (Tree::Node) $if-false (Tree::Node) Returns: (Base) — $if-true or $if-false

hue

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

hsla

hsla($hue, $saturation, $lightness, $alpha) Creates a Color from hue, saturation, lightness, and alpha 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 $alpha (Number) — The opacity of the color. Must b

ie_hex_str

ie_hex_str($color) Converts a color into the format understood by IE filters. Examples: ie-hex-str(#abc) => #FFAABBCC ie-hex-str(#3322BB) => #FF3322BB ie-hex-str(rgba(0, 255, 0, 0.5)) => #8000FF00 Parameters: $color (Color) Returns: (String) — The IE-formatted string representation of the color Raises: (ArgumentError) — if $color isn’t a color

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

grayscale

grayscale($color) Converts a color to grayscale. This is identical to desaturate(color, 100%). Parameters: $color (Color) Returns: (Color) Raises: (ArgumentError) — if $color isn’t a color

global_variable_exists

global_variable_exists($name) Check whether a variable with the given name exists in the global scope (at the top level of the file). Examples: $a-false-value: false; global-variable-exists(a-false-value) => true .foo { $some-var: false; @if global-variable-exists(some-var) { /* false, doesn't run */ } } Parameters: $name (String) — The name of the variable to check. The name should not include the $. Returns: (Bool) — Whether the variable is defined in the global scope

green

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

feature_exists

feature_exists($feature) Returns whether a feature exists in the current Sass runtime. The following features are supported: global-variable-shadowing indicates that a local variable will shadow a global variable unless !global is used. extend-selector-pseudoclass indicates that @extend will reach into selector pseudoclasses like :not. units-level-3 indicates full support for unit arithmetic using units defined in the Values and Units Level 3 spec. at-error indicates that the Sass @e

floor

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