Restructured by HugoGiraudel

Hugo Giraudel graciously re-wrote this function to use SASS maps. It's much cleaner now.