The Modular Style Sheet

This page is about the Modular Style Sheet. Modular in the sense of 'small groupings of properties and objects for the sake of re-using' as in real programming languages such as Oberon and Modula-2.
The MSS is based upon the CSS. If you want to know about the CSS, please study the web, there is more than enough information about it. This page is about the MSS, thereby only using parts which are already in the CSS. Consider the MSS a subset of the CSS without sacrificng functionality and gaining control. Take a look at this fraction of my CSS:

h1, 
h2, 
h3	{ font-family		: serif;
	  background-color	: white;
	}

h1	{ font-size		: 175%; 
	  color			: teal;
	}

h2	{ font-size		: 150%; 
	  color			: maroon;
	}

h3	{ font-size		: 125%; 
	  color			: olive;
	}
   
I define some basic properties for h1, h2 and h3 and then do some fine tuning towards each of them. That's using inheritance for the sake of modularity. The trouble kicks in when you decide to define something like
#elixers h1 { font-size		: 138%; }
   
since it is an override to the rule, for the sake of too much control, possibly for only one instance. It will be clear that this is the time to start with some definitions.

MSS definitions

A rule in MSS is defined in EBNF as follows:

   rule     =  element	'{' { property	':' value ';' } '}' .
   
If you are not familiar with EBNF, consult http://en.wikipedia.org/wiki/EBNF (consider it a valuable investment for the rest of your life).
Normally, EBNF definitions start getting more explicit in following lines, thereby declaring what an element is, what a property is and how the value is constructed. But that would be counter productive here since the CSS itself is not very structured. Just use your common sense.

MSS : elements

Below is a list of elements:

The list is not exhaustive but I think these are the majority of elements that will be liable to be CSs-ed.

MSS : properties

Below is a list of properties for MSS

Page created on 10 August 2009 and

Page equipped with FroogleBuster technology!