add policy and theme products
[zope-bootstrap.git] / src / koehsel.theme / koehsel / theme / browser / stylesheets / README.txt
1 README for the 'browser/stylesheets/' directory
2 ===============================================
3
4 This folder is a Zope 3 Resource Directory acting as a repository for
5 stylesheets.
6
7 Its declaration is located in 'browser/configure.zcml':
8
9     <!-- Resource directory for stylesheets -->
10     <browser:resourceDirectory
11         name="koehsel.theme.stylesheets"
12         directory="stylesheets"
13         layer=".interfaces.IThemeSpecific"
14         />
15
16 A stylesheet placed in this directory (e.g. 'main.css') can be accessed from
17 this relative URL:
18
19     "++resource++koehsel.theme.stylesheets/main.css"
20
21 Note that it might be better to register each of these resources separately if
22 you want them to be overridable from zcml directives.
23
24 The only way to override a resource in a resource directory is to override the
25 entire directory (all elements have to be copied over).
26
27 A Zope 3 browser resource declared like this in 'browser/configure.zcml':
28
29     <browser:resource
30         name="main.css"
31         file="stylesheets/main.css"
32         layer=".interfaces.IThemeSpecific"
33         />
34
35 can be accessed from this relative URL:
36
37     "++resource++main.css"
38
39 Notes
40 -----
41
42 * Stylesheets registered as Zope 3 resources might be flagged as not found in
43   the 'portal_css' tool if the layer they are registered for doesn't match the
44   default skin set in 'portal_skins'.
45   This can be confusing but it must be considered as a minor bug in the CSS
46   registry instead of a lack in the way Zope 3 resources are handled in
47   Zope 2.
48
49 * There might be a way to interpret DTML from a Zope 3 resource view.
50   Although, if you need to use DTML for setting values in a stylesheet (the
51   same way as in default Plone stylesheets where values are read from
52   'base_properties'), it is much easier to store it in a directory that is
53   located in the 'skins/' folder of your package, registered as a File System
54   Directory View in the 'portal_skins' tool, and added to the layers of your
55   skin.
56
57 * Customizing/overriding stylesheets that are originally accessed from the
58   'portal_skins' tool (e.g. Plone default stylesheets) can be done inside that
59   tool only. There is no known way to do it with Zope 3 browser resources.
60   Vice versa, there is no known way to override a Zope 3 browser resource from
61   a skin layer in 'portal_skins'.