Sass is-superselector() Function

Last Updated:

Sass is-superselector() Function

The is-superselector() function returns whether the selector $super matches all the elements that the selector $sub matches. It still returns true even if $super matches more elements than $sub.

Note: The $super and $sub selectors may contain placeholder selectors, but not parent selectors.

Example

SASS TO CSS CONVERTER
//Check your console @debug is-superselector("a", "a.span"); // true @debug is-superselector("button", ".foo > h3"); // false

Syntax

is-superselector($super, $sub)

Parameter Value

ValueTypeExplanation
$super Required Specifies a css selector.
$sub Required Specifies a css selector.

Return Value

ValueExplanation
bool Returns whether the selector $super matches all the elements that the selector $sub matches.

Share this Page

Meet the Author