Sass selector-extend() Function

Last Updated:

Sass selector-extend() Function

The selector-extend() function replaces all instances of $extendee in $selector with $extendee, $extender. If $selector doesn’t contain $extendee, returns it as-is.

Note: The $selector, $extendee, and $extender selectors may contain placeholder selectors, but not parent selectors.

Example

SASS TO CSS CONVERTER
#{selector-extend("a.disabled", "a", ".link")} { color: black; } #{selector-extend("a.disabled", "h1", "h2")} { color: black; }

Syntax

selector-extend($selector, $extendee, $extender)

Parameter Value

ValueTypeExplanation
$selector Required Specifies a css selector.
$extendee Required Specifies an extendee.
$extender Required Specifies an extender.

Return Value

ValueExplanation
selector Returns a copy of modified $selector.

Share this Page

Meet the Author