at-import / Sassy-Maps

Map helper functions for Sass 3.3 and up
MIT License
66 stars 22 forks source link

Anoying warnings when `map-get-deep()` is used to test if child exists #16

Open LoicGoyet opened 8 years ago

LoicGoyet commented 8 years ago

I need to use the map-get-deep() function to test if some map children values exists. It works great but when the test returns null it generates a @warning that can be annoying if the process is executed into a loop.

I succeed to avoid the "@warning" to pop by overriding the map-get-deep-warning() function by this way :

@function map-get-deep-warning($warn, $get) {
  @return null;
}

It makes the trick, but in a dirty way. It could be nice to have a function like map-has-key but for deep values following your pattern.