In SASS I would like to generate some css only if a map exists. For this I have to check first, if the map exists or not. It should work similar to this:
$mymap: (
width: 10px,
color: blue,
);
@if MAP-EXISTS($mymap) {
.myclass {
width: map-get($mymap, width);
color: map-get($mymap, blue);
}
}
Due to the fact that a function 'MAP-EXISTS()' does not exist in SASS: I am looking for a way to do this on another way. But I cannot figure it out.
So my Question is: How can I check if a map exists in SASS?
(SASS Version is V3.4.9)
Thx for answers and help.