Sass selector-unify() Function

You are Here:

Sass selector-unify() Function

The selector-unify() function returns a selector that matches only elements matched by both $selector1 and $selector2.

Example

SASS TO CSS CONVERTER
#{selector-unify("a", ".disabled")} { color: black; } #{selector-unify("a.disabled", "a.outgoing")} { color: black; } #{selector-unify(".warning a", "main a")} { color: black; }

Syntax

selector-unify($selector1, $selector2)

Parameter Value

ValueTypeExplanation
$selector1RequiredSpecifies first css selector
$selector2RequiredSpecifies second css selector

Return Value

ValueExplanation
selectorReturns a selector that matches only elements matched by both $selector1 and $selector2.
nullReturns null if $selector1 and $selector2 don’t match any of the same elements, or if there’s no selector that can express their overlap.

Reminder

Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Sass.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author