Sass Selector Functions
The selector functions are used to check and manipulate selectors.
The following table lists all selector functions in Sass :
Function | Description & Example |
---|---|
is-superselector(super, sub) | Checks whether the super selector matches all the elements that sub matches.
Example: |
selector-append(selectors) | Appends the second (and third/fourth etc.) selector to the first selector.
Example: |
selector-extend(selector, extendee, extender) | |
selector-nest(selectors) | Returns a new selector containing a nested list of CSS selectors based on the list provided.
Example: |
selector-parse(selector) | Returns a list of strings contained in selector using the same format as the parent selector.
Example: |
selector-replace(selector, original, replacement) | Returns a new selector with the selectors specified in replacement in place of selectors specified in original.
Example: |
selector-unify(selector1, selector2) | Returns a new selector that matches only elements matched by both selector1 and selector2.
Example: |
simple-selectors(selectors) | Returns a list of the individual selectors in selectors.
Example: |