buildrelease
[openafs-wiki.git] / TWiki / TWikiCss.mdwn
1 # <a name="Appendix C: TWiki CSS"></a> Appendix C: TWiki CSS
2
3 _Listing of CSS class names emitted from TWiki core code and standard plugins, for the Dakar release._
4
5 <div>
6   <ul>
7     <li><a href="#Appendix C: TWiki CSS"> Appendix C: TWiki CSS</a><ul>
8         <li><a href="#Who should read this document?"> Who should read this document?</a></li>
9         <li><a href="#Naming conventions"> Naming conventions</a><ul>
10             <li><a href="#TWiki styles in core code"> TWiki styles in core code</a></li>
11             <li><a href="#TWiki Styles in Plugins"> TWiki Styles in Plugins</a><ul>
12                 <li><a href="#TablePlugin"> TablePlugin</a></li>
13               </ul>
14             </li>
15             <li><a href="#TWiki Styles in Templates"> TWiki Styles in Templates</a></li>
16             <li><a href="#TWiki Styles used in =configure="> TWiki Styles used in configure</a></li>
17             <li><a href="#TWiki Styles in topics"> TWiki Styles in topics</a></li>
18             <li><a href="#TWiki Styles in Skins"> TWiki Styles in Skins</a></li>
19             <li><a href="#Reserved Styles"> Reserved Styles</a></li>
20           </ul>
21         </li>
22         <li><a href="#Tips"> Tips</a></li>
23       </ul>
24     </li>
25   </ul>
26 </div>
27
28 ## <a name="Who should read this document?"></a> Who should read this document?
29
30 Most html elements generated by TWiki core code now have Cascading Style Sheet (CSS) tags. **_Skin builders_** and others who want to change the appearance of the default TWiki installation or any of the skins can use this document to see what styles can be created for these html elements.
31
32 ## <a name="Naming conventions"></a> Naming conventions
33
34 1. All TWiki class names have the prefix `twiki`. So: twikiAlert, twikiToc, etcetera. Remember that CSS class names are case sensitive - TWiki CSS uses lowercase `tw`.
35 2. If you define your own CSS classes, it is preferable that you do not use the `twiki` prefix to prevent undesired overriding effects.
36
37 A wide range of standard styles are used in the TWiki core code and topics, and more are used in plugins. The following is an exhaustive list of all styles defined by the Pattern skin. For the most part, the names are the only documentation of the purpose of the style. For more information on how these styles are used, read the code (sorry!)
38
39 ### <a name="TWiki styles in core code"></a> TWiki styles in core code
40
41 <table border="1" cellpadding="0" cellspacing="0">
42   <tr>
43     <td> .twikiAlert </td>
44     <td> Client.pm, Form.pm, Statistics.pm </td>
45   </tr>
46   <tr>
47     <td> .twikiFirstCol </td>
48     <td> Render.pm </td>
49   </tr>
50   <tr>
51     <td> .twikiForm </td>
52     <td> Render.pm </td>
53   </tr>
54   <tr>
55     <td> .twikiNew </td>
56     <td> Changes.pm, Search.pm </td>
57   </tr>
58   <tr>
59     <td> .twikiHelp </td>
60     <td> Changes.pm </td>
61   </tr>
62   <tr>
63     <td> .twikiTopRow </td>
64     <td> Manage.pm </td>
65   </tr>
66   <tr>
67     <td> .twikiSummary </td>
68     <td> Manage.pm </td>
69   </tr>
70   <tr>
71     <td> .twikiGrayText </td>
72     <td> Manage.pm </td>
73   </tr>
74   <tr>
75     <td> .twikiCheckBox </td>
76     <td> Manage.pm </td>
77   </tr>
78   <tr>
79     <td> .twikiLink </td>
80     <td> Render.pm </td>
81   </tr>
82   <tr>
83     <td> .twikiNewLink </td>
84     <td> Render.pm </td>
85   </tr>
86   <tr>
87     <td> .twikiAnchorLink </td>
88     <td> Render.pm </td>
89   </tr>
90   <tr>
91     <td> .twikiCurrentWebHomeLink </td>
92     <td> Render.pm </td>
93   </tr>
94   <tr>
95     <td> .twikiCurrentTopicLink </td>
96     <td> Render.pm </td>
97   </tr>
98   <tr>
99     <td> .twikiEmulatedLink </td>
100     <td> Preview.pm </td>
101   </tr>
102   <tr>
103     <td> .twikiWebIndent </td>
104     <td> TWiki.pm </td>
105   </tr>
106 </table>
107
108 <table border="1" cellpadding="0" cellspacing="0">
109   <tr>
110     <td> .twikiEditFormDateField </td>
111     <td> Form.pm </td>
112   </tr>
113   <tr>
114     <td> .twikiEditFormTextField </td>
115     <td> Form.pm </td>
116   </tr>
117   <tr>
118     <td> .twikiEditFormLabelField </td>
119     <td> Form.pm </td>
120   </tr>
121   <tr>
122     <td> .twikiEditFormTextAreaField </td>
123     <td> Form.pm </td>
124   </tr>
125   <tr>
126     <td> .twikiEditFormCheckboxButton </td>
127     <td> Form.pm </td>
128   </tr>
129   <tr>
130     <td> .twikiEditFormCheckboxField </td>
131     <td> Form.pm </td>
132   </tr>
133   <tr>
134     <td> .twikiRadioButton </td>
135     <td> Form.pm </td>
136   </tr>
137   <tr>
138     <td> .twikiEditFormRadioField </td>
139     <td> Form.pm </td>
140   </tr>
141   <tr>
142     <td> .twikiEditFormError </td>
143     <td> Form.pm </td>
144   </tr>
145 </table>
146
147 <table border="1" cellpadding="0" cellspacing="0">
148   <tr>
149     <td> .twikiDiffTable </td>
150     <td> RDiff.pm </td>
151   </tr>
152   <tr>
153     <td> .twikiDiffDeletedHeader </td>
154     <td> RDiff.pm </td>
155   </tr>
156   <tr>
157     <td> .twikiDiffDeletedMarker </td>
158     <td> RDiff.pm </td>
159   </tr>
160   <tr>
161     <td> .twikiDiffDeletedText </td>
162     <td> RDiff.pm </td>
163   </tr>
164   <tr>
165     <td> .twikiDiffAddedHeader </td>
166     <td> RDiff.pm </td>
167   </tr>
168   <tr>
169     <td> .twikiDiffAddedMarker </td>
170     <td> RDiff.pm </td>
171   </tr>
172   <tr>
173     <td> .twikiDiffAddedText </td>
174     <td> RDiff.pm </td>
175   </tr>
176   <tr>
177     <td> .twikiDiffChangedHeader </td>
178     <td> RDiff.pm </td>
179   </tr>
180   <tr>
181     <td> .twikiDiffChangedText </td>
182     <td> RDiff.pm </td>
183   </tr>
184   <tr>
185     <td> .twikiDiffUnchangedText </td>
186     <td> RDiff.pm </td>
187   </tr>
188   <tr>
189     <td> .twikiDiffUnchangedTextContents </td>
190     <td> RDiff.pm </td>
191   </tr>
192   <tr>
193     <td> .twikiDiffLineNumberHeader </td>
194     <td> RDiff.pm </td>
195   </tr>
196   <tr>
197     <td> .twikiDiffDebug </td>
198     <td> RDiff.pm </td>
199   </tr>
200   <tr>
201     <td> .twikiDiffDebugRight </td>
202     <td> RDiff.pm </td>
203   </tr>
204   <tr>
205     <td> .twikiDiffDebugLeft </td>
206     <td> RDiff.pm </td>
207   </tr>
208 </table>
209
210 <table border="1" cellpadding="0" cellspacing="0">
211   <tr>
212     <td> .twikiToc </td>
213     <td> TWiki.pm </td>
214   </tr>
215   <tr>
216     <td> .twikiTocTitle </td>
217     <td> TWiki.pm </td>
218   </tr>
219 </table>
220
221 ### <a name="TWiki Styles in Plugins"></a> TWiki Styles in Plugins
222
223 #### <a name="TablePlugin"></a> [[TablePlugin]]
224
225 <table border="1" cellpadding="0" cellspacing="0">
226   <tr>
227     <td><code>.twikiTable</code></td>
228     <td> The table </td>
229   </tr>
230   <tr>
231     <td><code>.twikiSortedCol</code></td>
232     <td> A sorted column </td>
233   </tr>
234   <tr>
235     <td><code>.twikiSortedAscendingCol</code></td>
236     <td> Sorted column, ascending </td>
237   </tr>
238   <tr>
239     <td><code>.twikiSortedDescendingCol</code></td>
240     <td> Sorted column, descending </td>
241   </tr>
242   <tr>
243     <td><code>.tableSortIcon</code></td>
244     <td> The sort icon holder (span) </td>
245   </tr>
246   <tr>
247     <td><code>.twikiFirstCol</code></td>
248     <td> The first column </td>
249   </tr>
250   <tr>
251     <td><code>.twikiTableEven</code></td>
252     <td> Even numbered rows </td>
253   </tr>
254   <tr>
255     <td><code>.twikiTableOdd</code></td>
256     <td> Odd numbered rows </td>
257   </tr>
258   <tr>
259     <td><code>.twikiTableCol</code> + column number </td>
260     <td> Unique column identifier, for instance: <code>twikiTableCol0</code></td>
261   </tr>
262   <tr>
263     <td><code>.twikiTableRow</code> + type + row number </td>
264     <td> Unique row identifier, for instance: <code>twikiTableRowdataBg0</code></td>
265   </tr>
266 </table>
267
268 ### <a name="TWiki Styles in Templates"></a> TWiki Styles in Templates
269
270 <table border="1" cellpadding="0" cellspacing="0">
271   <tr>
272     <td> .twikiPage </td>
273     <td> twiki.tmpl </td>
274   </tr>
275   <tr>
276     <td> .twikiMiddleContainer </td>
277     <td> twiki.tmpl </td>
278   </tr>
279   <tr>
280     <td> .twikiMain </td>
281     <td> twiki.tmpl </td>
282   </tr>
283   <tr>
284     <td> .twikiFormTable </td>
285     <td> formtables.tmpl, form.tmpl </td>
286   </tr>
287   <tr>
288     <td> .twikiFormTableHRow </td>
289     <td> formtables.tmpl, form.tmpl </td>
290   </tr>
291   <tr>
292     <td> .twikiFormTableRow </td>
293     <td> formtables.tmpl </td>
294   </tr>
295   <tr>
296     <td> .twikiFormTableFooter </td>
297     <td> formtables.tmpl </td>
298   </tr>
299   <tr>
300     <td> .twikiAttachments </td>
301     <td> attachtables.tmpl </td>
302   </tr>
303   <tr>
304     <td> .twikiEditForm </td>
305     <td> form.tmpl </td>
306   </tr>
307   <tr>
308     <td> .twikiSubmit </td>
309     <td>   </td>
310   </tr>
311   <tr>
312     <td> .twikiSubmitDisabled </td>
313     <td>   </td>
314   </tr>
315   <tr>
316     <td> .twikiInputField </td>
317     <td>   </td>
318   </tr>
319   <tr>
320     <td> .twikiInputFieldDisabled </td>
321     <td>   </td>
322   </tr>
323   <tr>
324     <td> .twikiInputFieldReadOnly </td>
325     <td>   </td>
326   </tr>
327   <tr>
328     <td> .twikiInputFieldFocus </td>
329     <td> For Internet Explorer that does not recognize the <code>:focus</code> pseudo class selector </td>
330   </tr>
331   <tr>
332     <td> .twikiInputFieldBeforeFocus </td>
333     <td> for use with Javascript: the color of the input text when not clicked in the field </td>
334   </tr>
335   <tr>
336     <td> .twikiTextarea </td>
337     <td>   </td>
338   </tr>
339   <tr>
340     <td> .twikiTextareaRawView </td>
341     <td>   </td>
342   </tr>
343   <tr>
344     <td> .twikiButton </td>
345     <td>   </td>
346   </tr>
347   <tr>
348     <td> .twikiFocus </td>
349     <td> Behaviour marker so a field can be given input focus </td>
350   </tr>
351   <tr>
352     <td> .twikiLeft </td>
353     <td>   </td>
354   </tr>
355   <tr>
356     <td> .twikiRight </td>
357     <td>   </td>
358   </tr>
359   <tr>
360     <td> .twikiClear </td>
361     <td>   </td>
362   </tr>
363   <tr>
364     <td> .twikiHidden </td>
365     <td>   </td>
366   </tr>
367   <tr>
368     <td> .twikiSmall </td>
369     <td>   </td>
370   </tr>
371   <tr>
372     <td> .twikiBottomRow </td>
373     <td>   </td>
374   </tr>
375   <tr>
376     <td> .twikiSRAuthor </td>
377     <td>   </td>
378   </tr>
379   <tr>
380     <td> .twikiSRRev </td>
381     <td>   </td>
382   </tr>
383   <tr>
384     <td> .twikiPageForm </td>
385     <td>   </td>
386   </tr>
387   <tr>
388     <td> .twikiSeparator </td>
389     <td>   </td>
390   </tr>
391   <tr>
392     <td> .twikiAccessKey </td>
393     <td>   </td>
394   </tr>
395   <tr>
396     <td> .twikiLinkLabel </td>
397     <td>   </td>
398   </tr>
399   <tr>
400     <td> .twikiFormSteps </td>
401     <td> container around a form, such as the attach form: attach.tmpl </td>
402   </tr>
403   <tr>
404     <td> .twikiFormStep </td>
405     <td> form row </td>
406   </tr>
407   <tr>
408     <td> .twikiNoBreak </td>
409     <td> no break on whitespace </td>
410   </tr>
411   <tr>
412     <td> .twikiMakeVisible </td>
413     <td> For elements that should only be visible with javascript on: default set to hidden, is made visible by javascript. Defaults to inline. </td>
414   </tr>
415   <tr>
416     <td> .twikiMakeVisibleInline </td>
417     <td> For <code>span</code> elements that should only be visible with javascript on: default set to hidden, is made visible by javascript. </td>
418   </tr>
419   <tr>
420     <td> .twikiMakeVisibleBlock </td>
421     <td> For <code>div</code> elements that should only be visible with javascript on: default set to hidden, is made visible by javascript. </td>
422   </tr>
423   <tr>
424     <td> .twikiMakeHidden </td>
425     <td> For elements that should be <strong>hidden</strong> with javascript on: no default style, is made hidden by javascript. </td>
426   </tr>
427   <tr>
428     <td> .twikiFooterNote </td>
429     <td>   </td>
430   </tr>
431   <tr>
432     <td> .twikiPopUp </td>
433     <td> Behaviour marker so a popup-window can be invoked </td>
434   </tr>
435 </table>
436
437 ### <a name="TWiki Styles used in &lt;code&gt;configure="></a> TWiki Styles used in =configure
438
439 <table border="1" cellpadding="0" cellspacing="0">
440   <tr>
441     <td> #twikiLogin </td>
442     <td> CSS.pm </td>
443   </tr>
444   <tr>
445     <td> .twikiFormSteps </td>
446     <td> CSS.pm </td>
447   </tr>
448   <tr>
449     <td> .twikiFormStep </td>
450     <td> CSS.pm </td>
451   </tr>
452 </table>
453
454 ### <a name="TWiki Styles in topics"></a> TWiki Styles in topics
455
456 <table border="1" cellpadding="0" cellspacing="0">
457   <tr>
458     <td> .twikiBroadcastMessage </td>
459     <td> %SYSTEMWEB%.TWikiPreferences </td>
460   </tr>
461   <tr>
462     <td> #twikiSearchTable </td>
463     <td> %SYSTEMWEB%.WebSearch, %SYSTEMWEB%.WebSearchAdvanced </td>
464   </tr>
465 </table>
466
467 ### <a name="TWiki Styles in Skins"></a> TWiki Styles in Skins
468
469 <table border="1" cellpadding="0" cellspacing="0">
470   <tr>
471     <td> #twikiLogin </td>
472     <td> login.pattern.tmpl </td>
473     <td>   </td>
474   </tr>
475 </table>
476
477 ### <a name="Reserved Styles"></a> Reserved Styles
478
479 <table border="1" cellpadding="0" cellspacing="0">
480   <tr>
481     <td> .twikiImage </td>
482     <td> defined in [[Main/PatternSkin]]</td>
483     <td> div creates border around enclosed image </td>
484   </tr>
485   <tr>
486     <td> .twikiNotification </td>
487     <td> defined in [[Main/PatternSkin]]</td>
488     <td> temporary alert, lighter than broadcast message </td>
489   </tr>
490   <tr>
491     <td> .twikiUnvisited </td>
492     <td> defined in [[Main/PatternSkin]]</td>
493     <td> link style that ignores the visited link state; useful for form links </td>
494   </tr>
495 </table>
496
497 ## <a name="Tips"></a> Tips
498
499 PatternSkin makes extensive use of CSS in its templates. Read the [[PatternSkin]] topic and [[PatternSkinCss]] to learn more about creating your own CSS-based skin.
500
501 Practical introduction to CSS: <http://www.w3.org/Style/LieBos2e/enter/>
502
503 **_Related Topics:_** [[TWikiSkins]], [[PatternSkin]], [[DeveloperDocumentationCategory]], [[AdminDocumentationCategory]]