Skip to content

Instantly share code, notes, and snippets.

@fbriere
Last active November 23, 2017 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbriere/b0471e5de43e7bee9ce4 to your computer and use it in GitHub Desktop.
Save fbriere/b0471e5de43e7bee9ce4 to your computer and use it in GitHub Desktop.
Stylish style for Environment Canada weather page
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document
url-prefix("https://weather.gc.ca/city/pages/"),
url-prefix("https://meteo.gc.ca/city/pages/")
{
/* Hide everything except the main contents */
header, /* Header */
header + div, header + div + div, /* Various links */
/* Within main.container: */
div#noalert, /* "No Alerts" box */
h1#wb-cont, /* City name */
div#mainContent > section:nth-child(2) > details > table tr:nth-child(3), /* "Night" row */
div#mainContent > section:nth-child(4), /* Averages and extremes */
div#mainContent > section:nth-child(5), /* Yesterday's Data */
div#container + div.row, /* Follow + Print Instructions link */
section#printinstr, /* Print Instructions box */
section#weather-topics, /* Various weather topic links */
section.gc-prtts, /* Alberta EmergAlert */
div.pagedetails, /* Modification date */
aside.gc-nttvs, /* Activities and initiatives */
footer /* Footer */
{
display: none !important;
}
/* Hide "Current Conditions" / "Forecast" headers, but keep links in place */
div#mainContent > section:nth-child(-n+2) > details > summary {
display: none !important;
}
div#mainContent > section:nth-child(-n+2) > details > ul {
display: inline;
margin-top: -35px !important;
}
div#mainContent > section:nth-child(-n+2) > details > ul * {
height: 20px !important;
border: none !important;
}
/* Shrink forecast icons */
div#mainContent > section:nth-child(2) table img {
width: 40%;
height: auto;
}
/* Get rid of item bullets */
summary {
display: block !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment