Data types
numbers e.g. 1.2, 13, 10px
|
strings of text, with and without quotes e.g. "foo", 'bar', baz
|
colors e.g. blue, #04a3f9, rgba(255, 0, 0, 0.5)
|
booleans e.g. true, false
|
null e.g. null
|
lists of values, separated by spaces or commas e.g. 1.5em 1em 0 2em, Helvetica, Arial, sans-serif
|
maps from one value to another e.g. (key1: value1, key2: value2)
|
String::Functions
Removes quotes from a string.
|
Adds quotes to a string.
|
Returns the number of characters in a string.
|
str-insert($string, $insert, $index)
Inserts $insert into $string at $index.
|
str-index($string, $substring)
Returns the index of the first occurance of $substring in $string.
|
str-slice($string, $start-at, [$end-at])
Extracts a substring from $string.
|
to-upper-case($string)
Converts a string to upper case.
|
to-lower-case($string)
Converts a string to lower case.
|
Number :: Functions
Converts a unitless number to a percentage.
|
Rounds a number to the nearest whole number.
|
Rounds a number up to the next whole number.
|
Rounds a number down to the previous whole number.
|
Returns the absolute value of a number.
|
Finds the minimum of several numbers.
|
Finds the maximum of several numbers.
|
Returns a random number.
|
|
|
Maps::functions
Returns the value in a map associated with a given key.
|
map-merge($map1, $map2)
Merges two maps together into a new map.
|
map-remove($map, $keys…)
Returns a new map with keys removed.
|
Returns a list of all keys in a map.
|
Returns a list of all values in a map.
|
map-has-key($map, $key)
Returns whether a map has a value associated with a given key.
|
Returns the keywords passed to a function that takes variable arguments.
|
List : Functions
Returns the length of a list.
|
Returns a specific item in a list.
|
join($list1, $list2, [$separator])
Joins together two lists into one.
|
append($list1, $val, [$separator])
Appends a single value onto the end of a list.
|
Combines several lists into a single multidimensional list.
|
Returns the position of a value within a list.
|
list-separator(#list)
Returns the separator of a list.
|
Misc :: Functions
if($condition, $if-true, $if-false)
Returns one of two values, depending on whether or not $condition is true.
|
Returns a unique CSS identifier.
|
|
|
Selector Functions
selector-nest($selectors…)
Nests selector beneath one another like they would be nested in the stylesheet.
|
selector-append($selectors…)
Appends selectors to one another without spaces in between.
|
selector-extend($selector, $extendee, $extender)
Extends $extendee with $extender within $selector.
|
selector-replace($selector, $original, $replacement)
Replaces $original with $replacement within $selector.
|
selector-unify($selector1, $selector2)
Unifies two selectors to produce a selector that matches elements matched by both.
|
is-superselector($super, $sub)
Returns whether $super matches all the elements $sub does, and possibly more.
|
simple-selectors($selector)
Returns the simple selectors that comprise a compound selector.
|
selector-parse($selector)
Parses a selector into the format returned by &.
|
Introspection :: Functions
feature-exists($feature)
Returns whether a feature exists in the current Sass runtime.
|
variable-exists($name)
Returns whether a variable with the given name exists in the current scope.
|
global-variable-exists($name)
Returns whether a variable with the given name exists in the global scope.
|
function-exists($name)
Returns whether a function with the given name exists.
|
Returns whether a mixin with the given name exists.
|
Returns the string representation of a value as it would be represented in Sass.
|
Returns the type of a value.
|
Returns the unit(s) associated with a number.
|
Returns whether a number has units.
|
comparable($number1, $number2)
Returns whether two numbers can be added, subtracted, or compared.
|
Dynamically calls a Sass function.
|
|
Created By
www.mister-graphx.com
Metadata
Favourited By
Comments
Mist. GraphX, 19:31 9 Jan 17
Even if there is another cheat sheet, about same subject, in my opinion this one is more complete and useful.
Hope you'll like it.
Add a Comment
Related Cheat Sheets
More Cheat Sheets by Mist. GraphX