sass-site/source/code-snippets/example-map-get.liquid

12 lines
385 B
Plaintext
Raw Normal View History

2023-05-29 19:39:35 +02:00
{% codeExample 'map-get', false %}
$font-weights: ("regular": 400, "medium": 500, "bold": 700);
@debug map.get($font-weights, "medium"); // 500
@debug map.get($font-weights, "extra-bold"); // null
===
$font-weights: ("regular": 400, "medium": 500, "bold": 700)
@debug map.get($font-weights, "medium") // 500
@debug map.get($font-weights, "extra-bold") // null
{% endcodeExample %}