From 89e06f398d2bb13fa359763557a60d66c706314b Mon Sep 17 00:00:00 2001 From: crschmidt Date: Fri, 6 Oct 2006 04:03:58 +0000 Subject: [PATCH] Commit changes to code for skinning, including doc/customization, which documents the class style naming for OL, although it isn't implemented yet, so that we have a standard to work against. Update release scripts, tests, and create a 'theme' directory which will hold theme information as it is developed. git-svn-id: http://svn.openlayers.org/trunk/openlayers/doc@1639 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- customization | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 customization diff --git a/customization b/customization new file mode 100644 index 0000000000..f4b5b98aa9 --- /dev/null +++ b/customization @@ -0,0 +1,49 @@ +Customizing OpenLayers +====================== + +OpenLayers is designed to fit many needs -- fitting in alongside all kinds of +various applications which are currently in use. + +Currently, OpenLayers supports a 'theme' option when creating a map. This +theme option allows you to specify the location of a CSS theme which should +be included. + +A default theme is available as an example in the theme/ directory: the setup +is: + + * theme/ + * theme/default/ + * theme/default/style.css + * theme/default/img/ + +Currently, the OpenLayers code does not support class names, and therefore, +it is not possible to control many aspects of OpenLayers code with CSS +classes. However, with this framework in place, we expect to invest time +to make existing features and new features use the CSS theming framework +where apropriate. + + +Class Naming +============ +Elements should have class names which are descriptive of the Javascript +class from which they come. For example, the main layer switcher element +in the OpenLayers.Control.LayerSwitcher would be classed: + + olControlLayerSwitcher + +This would allow users to add to their style.css class in their theme, +changing, for example: + +:: + + .olControlLayerSwitcher input { + width:10px; + } + +Sub elements of a particular control can add to the class name: + +:: + + .olControlLayerSwitcherBaseLabel { + color: red; + }