[OpenLayers-Users] Theme question...

Tim Schaub tschaub at openplans.org
Thu Nov 29 18:41:46 EST 2007


Hey-

Steve Lime wrote:
> Hi all: Question about a map's theme. My assumption is that one could use that mechanism to override the default (blue)
> styling of OpenLayers. Yet, when I do so I'm seeing (via firebug) both my theme's style.css and the default style.css being
> loaded and as a result the custom styles don't get applied. Am I misunderstanding the theme concept?

If you haven't already, see:
http://openlayers.org/dev/examples/custom-style.html

If you want to cascade styles, you have to include your stylesheets in a 
link tag.  If you don't do this (or if you use anything other than 
{theme: null} in your map options), you get a stylesheet added 
dynamically.  This breaks cascading styles - as the default styles might 
(will likely) get applied after any style declarations you have made in 
your html or other linked stylesheets.

Also, note that not all style related stuff has been pulled out of the 
code.  That is, there are still style declarations in the library - 
these trump any you have made with css.  The skinning of OpenLayers is 
definitely a work in progress.  If there is something specific that you 
can't control with CSS, please make a ticket.

If you're having a different issue, disregard this.

Tim


> 
> Steve
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> !DSPAM:4033,474f407f272433327367457!
> 




More information about the Users mailing list