Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.10 (build 3086) - 24 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

Default CumulusMX Stylesheet - weatherstyle.css

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
stevendt
Posts: 82
Joined: Sat 23 May 2020 4:19 pm
Weather Station: Davis Vatnage Pro2 Plus
Operating System: Windows 7/10
Location: Aberdeen, Scotland

Default CumulusMX Stylesheet - weatherstyle.css

Post by stevendt »

First of all, I know nothing about .css, but trying to learn a little so that I can customise my web pages.

I have been looking at the weatherstyle.css file that CumulusMX uses and see something that I don't understand . . .

Based on the file timestamp, the .css file has probably not been updated from some time and since it works, there's probably no apetite to revisit it, but it would be nice to clean it up - if only to help newbies (like me) trying to understand the script. Anyway, here's my question . . .

For example, I suppose the h2 style section sets the style for anything using heading 2?

The weatherstyle.css file has sections related to h2

Code: Select all

h2 {
	font-size: 125%;
	font-weight: bold;
	color: #6F9DBE;
	letter-spacing: 0.4em;
	text-transform: lowercase;
	font-family: Arial, Helvetica, sans-serif;
	text-align: left;
}
and, further down :

Code: Select all

h2 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 90%;
	color: #555555;
	letter-spacing: 0.15em;
	padding-bottom: .2em;
	background-color: #c0cad3;
	text-align: right;
	padding-top: .2em;
	padding-right: 1em;
}
Similarly, the "font-familiy" is set in the individual heading, but also in a group (h1,h2, ...)

I'm guessing that, if multiple entries exist, then the last entry wins (?), but is the current layout just an accident, or is it really by design. It may be that, as the style developed, the author (or later editors) wanted to add to the style, but should changes have been done to the existing section, rather than adding a new one?

Where an element is different, e.g., "font-size" and "text-align", will the later entry not always "win", so the earlier entry could/should be deleted ?

I'm not criticising here, I just want to understand why the .css is formatted as it is ? Maybe the .css was created/edited by some software package, rather than manually editing and the package just wasn't clever enough to replace, rather than add, duplicate entries in the file?

Or is it that h2, for example, can be differnt in different regions of the file to apply to different regions of the web page that uses it?

regards
Dave

User avatar
beteljuice
Posts: 2950
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: Default CumulusMX Stylesheet - weatherstyle.css

Post by beteljuice »

The css is very old, and most likely the additional h2 was a 'tweak'
I'm guessing that, if multiple entries exist, then the last entry wins (?)
For entries of the same 'type' (eg. color:) yes
... but inline (<element class="the class" style=" ....) style will take precedence over class.
... and if you have two or more classes, they will be applied in order stated.

... and then ... there is always the possibility they are altered by javascript :lol:

If you ever learn css, please teach the beteljuice :lol:
Image
......................Imagine, what you will KNOW tomorrow !

ExperiMentor
Posts: 194
Joined: Tue 24 Nov 2015 11:30 pm
Weather Station: Fine Offset & Davis Vantage Vue
Operating System: Windows 10; Raspbian Buster
Location: Switzerland

Re: Default CumulusMX Stylesheet - weatherstyle.css

Post by ExperiMentor »

stevendt wrote:
Thu 25 Jun 2020 12:37 pm
First of all, I know nothing about .css, but trying to learn a little so that I can customise my web pages.
Suggest that, rather than learning by dissecting this single example, google "CSS instructions". There are millions of online resources. This one not only includes tutorial, but also lets you test out the different options in real time without having to upset your website ... https://www.w3schools.com/css/

stevendt
Posts: 82
Joined: Sat 23 May 2020 4:19 pm
Weather Station: Davis Vatnage Pro2 Plus
Operating System: Windows 7/10
Location: Aberdeen, Scotland

Re: Default CumulusMX Stylesheet - weatherstyle.css

Post by stevendt »

Hi,

thanks for the link - that's a useful practice tool

At this stage, I just want to clean up the Cumulus page, but it is a useful resource for the future

regards
Dave

Post Reply