[dojo-contributors] squid theme

Bill Keese bill at dojotoolkit.org
Fri Aug 17 19:44:34 EDT 2007


Wow, a lot of traffic on this topic but I guess it is important.  It's 
making me wonder just how much a theme should do.  In addition to 
defining how the widgets look, should it:

- reset ?
- provide page style, ex: setting the default font ?


1. concerning reset

peter e higgins wrote:
 > My thoughts would be to move relevant dojo.css styles into dijit.css...

I'm afraid that any "reset" rules we include into dijit.css like

table { border: 0; }

are useless to widgets because the page might override them. (If the 
user wants borders on his/her "real" tables.)   All we can do is to use 
dijitReset in our templates, like:

<table class="dijitReset dijitMenu">

We can still include the reset rules as part of the theme, but the 
widgets shouldn't depend on them.  It would just be a service to the user.


2. themes defines page style

As demonstrated by squid, themes want to provide general styling rules 
for the page, to make the page contents match the widgets.  Ex:

.squid {
	background:#1E1E1E;
	color: #ECFED8;
}

Now I'm conflicted, because we just spent 50 emails complaining that 
dojo has no business defining the style for the page (specifically with 
table margins).   Not sure how to reconcile those two things.


3. dijitTests.css

> a simple solution would be to have a 'default 
> background gradient' for each of the supported themes in dijitTests.css eg:
> body.tundra { }, body.squid { } ... 


Agreed.  The background image we are using for the tests shouldn't be 
part of the theme itself, but should vary depending on the theme, so 
dijitTests.css is a good place to specify that behavior.



More information about the dojo-contributors mailing list