sass-maps

SASS : Check if a variable is a map

拟墨画扇 提交于 2019-12-22 05:18:24
问题 Is there something like is-map($some_variable) in SASS? I have tried looking into the documentation but there is none there. 回答1: You can implement it with the type-of function, like this one: @function is-map($var){ @return type-of($var) == 'map'; } 来源: https://stackoverflow.com/questions/39052819/sass-check-if-a-variable-is-a-map

SASS : Check if a variable is a map

吃可爱长大的小学妹 提交于 2019-12-05 09:25:42
Is there something like is-map($some_variable) in SASS? I have tried looking into the documentation but there is none there. You can implement it with the type-of function, like this one: @function is-map($var){ @return type-of($var) == 'map'; } 来源: https://stackoverflow.com/questions/39052819/sass-check-if-a-variable-is-a-map