Skip to content

Commit

Permalink
Refactored DOM generation code to minimize repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
jclarke0000 committed Dec 5, 2018
1 parent 19e7f66 commit 386571a
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 293 deletions.
28 changes: 23 additions & 5 deletions MMM-DarkSkyForecast.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
color: #6FC4F5;
}

.MMM-DarkSkyForecast .accumulation:before {
content: " ";
}

/* Current Conditions */

Expand Down Expand Up @@ -54,8 +57,8 @@


/* Inline icons */
.MMM-DarkSkyForecast .icon.inline,
.MMM-DarkSkyForecast .wrapper.tiled .forecast-container .forecast-item .icon.inline {
.MMM-DarkSkyForecast .inline-icon,
.MMM-DarkSkyForecast .wrapper.tiled .forecast-container .forecast-item .inline-icon {
display: inline-block;
width: 24px;
height: 24px;
Expand All @@ -68,11 +71,12 @@
/* Extra Current Conditions */

.MMM-DarkSkyForecast .extra-current-conditions-wrapper .temperature-container,
.MMM-DarkSkyForecast .extra-current-conditions-wrapper .precipitation,
.MMM-DarkSkyForecast .extra-current-conditions-wrapper .wind {
.MMM-DarkSkyForecast .extra-current-conditions-wrapper .precipitation-container,
.MMM-DarkSkyForecast .extra-current-conditions-wrapper .wind-container {
display: inline-block;
white-space: nowrap;
margin:0 15px;
margin-bottom: 10px;
}

/* Summary */
Expand All @@ -85,6 +89,7 @@
/* Forecast Header */

.MMM-DarkSkyForecast .module-header.forecast-header {
margin-top: 20px;
margin-bottom: 0;
}

Expand Down Expand Up @@ -220,11 +225,24 @@
text-align: right;
}

.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .icon {
.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .forecast-icon {
width: 30px;
height: 30px;
display: block;
vertical-align: middle;
}

.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .time,
.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .high-temperature,
.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .low-temperature, {
white-space: nowrap;
}

.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .wind-gusts,
.MMM-DarkSkyForecast .wrapper.table .forecast-container .forecast-item .accumulation {
display: block;
white-space: nowrap;
}



Loading

0 comments on commit 386571a

Please sign in to comment.