Sass map-get() Function

You are Here:

Sass map-get() Function

The map-get() function returns the value in a map associated with a key.

Example

SASS TO CSS CONVERTER
//Check your console $font-weights: ("regular": 400, "medium": 500, "bold": 700); @debug map-get($font-weights, "medium"); // 500 @debug map-get($font-weights, "extra-bold"); // null

Syntax

map-get($map, $key)

Parameter Value

ValueTypeExplanation
$mapRequiredSpecifies an array.
$keyRequiredSpecifies a key in an array.

Return Value

ValueExplanation
valueReturns the value in $map associated with $key.

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