Added mappings for Forecast.io.
parent
f6453a6544
commit
65b92d67b5
@ -0,0 +1,37 @@
|
||||
// icon definitions
|
||||
// --------------------------
|
||||
|
||||
@forecast-io-mapping-namespace: forecast-io;
|
||||
|
||||
// create the icon definitions
|
||||
@forecast-io-condition-code-mappings:
|
||||
"clear-day" "day-sunny",
|
||||
"clear-night" "night-clear",
|
||||
"cloudy" "cloudy",
|
||||
"fog" "fog",
|
||||
"hail" "hail",
|
||||
"partly-cloudy-day" "day-cloudy",
|
||||
"partly-cloudy-night" "night-partly-cloudy",
|
||||
"rain" "rain",
|
||||
"sleet" "sleet",
|
||||
"snow" "snow",
|
||||
"thunderstorm" "thunderstorm",
|
||||
"tornado" "tornado",
|
||||
"wind" "windy";
|
||||
|
||||
// generate condition code mapping classes and @extend the matching class
|
||||
// todo: extend() doesn't seem to function...
|
||||
.createForecastIOMappings(@iterator: 1) when(@iterator <= length(@forecast-io-condition-code-mappings)) {
|
||||
|
||||
@forecast-io-condition-code: extract(extract(@forecast-io-condition-code-mappings, @iterator), 1);
|
||||
@forecast-io-condition-code-mapping: extract(extract(@forecast-io-condition-code-mappings, @iterator), 2);
|
||||
@forecast-io-condition-code-mapping-unquoted: ~"@{forecast-io-condition-code-mapping}";
|
||||
|
||||
.@{wi-css-prefix}-@{forecast-io-mapping-namespace}-@{forecast-io-condition-code}:before {
|
||||
|
||||
&:extend(.@{wi-css-prefix}-@{forecast-io-condition-code-mapping-unquoted}:before all);
|
||||
}
|
||||
|
||||
.createForecastIOMappings((@iterator + 1));
|
||||
}
|
||||
.createForecastIOMappings();
|
@ -0,0 +1,31 @@
|
||||
// icon definitions
|
||||
// --------------------------
|
||||
|
||||
$forecast-io-mapping-namespace: forecast-io;
|
||||
|
||||
// create the icon definitions
|
||||
$forecast-io-condition-code-mappings: (
|
||||
|
||||
"clear-day" : "day-sunny",
|
||||
"clear-night" : "night-clear",
|
||||
"cloudy" : "cloudy",
|
||||
"fog" : "fog",
|
||||
"hail" : "hail",
|
||||
"partly-cloudy-day" : "day-cloudy",
|
||||
"partly-cloudy-night": "night-partly-cloudy",
|
||||
"rain" : "rain",
|
||||
"sleet" : "sleet",
|
||||
"snow" : "snow",
|
||||
"thunderstorm" : "thunderstorm",
|
||||
"tornado" : "tornado",
|
||||
"wind" : "windy"
|
||||
);
|
||||
|
||||
// generate condition code mapping classes and @extend the matching class
|
||||
@each $forecast-io-condition-code, $forecast-io-condition-code-mapping in $forecast-io-condition-code-mappings {
|
||||
|
||||
.#{$wi-css-prefix}-#{$forecast-io-mapping-namespace}-#{$forecast-io-condition-code}:before {
|
||||
|
||||
@extend .#{$wi-css-prefix}-#{$forecast-io-condition-code-mapping};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue