Wiki source code of CSS Files

Last modified by Lucas Charpentier (Sereza7) on 2024/02/21

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 This page helps you understand the different css files used in XWiki, their purpose and content. XWiki skins use several css files to separe the different components of the skin: basic elements, layout, colors, etc. Check [[this page>>xwiki:Documentation.DevGuide.Tutorials.Skins.CSSLayout]] to learn about the XWiki layout.
6
7 = Core files =
8
9 == style.css ==
10
11 This is the top level style file. It's purpose is to include all the other files. It shouldn't have any other css in there. It looks like this:
12
13 {{code language="css"}}
14 @import "classes.css";
15 @import "colorsblack.css";
16 @import "elements.css";
17 @import "presentation.css";
18 @import "screenlayout.css";
19 ...
20 {{/code}}
21
22 {{version since="16.0.0"}} This file is now populated by style.less.vm, which contains in its template all the imports.{{/version}}
23
24
25
26 == classes.css ==
27
28 Like ##elements.css##, but formats elements having a similar semantic meaning (after all, a class should have a semantic name, and not a random id). As examples: .underline, .hidden, .sep, wikicreatelink, or .heading-1-1. This should only contain general classes (for specific elements see ##presentation.css##). It looks like this:
29
30 {{code language="css"}}
31 .xwikisep, .xwikisep2 {
32 display: none;
33 }
34 .clear, .clearfloats {
35 clear: both;
36 }
37 .none, .hidden {
38 display: none;
39 }
40 ...
41 {{/code}}
42
43 == screenlayout.css ==
44
45 The place where the general layout of the interface is specified. This file should contain rules regarding position, dimension and display mode for the major elements of the interface (header, side panels, menu, footer...).
46
47 {{code language="css"}}
48 body#body{
49 width: 100%;
50 padding: 0;
51 margin: 0 ;
52 min-width: 760px;
53 }
54 .minwidth, .minwidthb, .minwidthc{
55 width: 720px;
56 height: 0px;
57 }
58 .minwidthc{
59 width: 438px;
60 }
61 ...
62 {{/code}}
63
64 == presentation.css ==
65
66 Refinement of ##screenlayout.css##. This is where borders, margins, paddings are set, font styling for objects not in ##elements.css## or ##classes.css##, along with some specific elements of the layout which are not affecting the general layout (where is the profile picture displayed, how is the comment author displayed, etc.).
67
68 {{code language="css"}}
69 .box,
70 .main-content {
71 margin: 0.5em;
72 }
73 ...
74 {{/code}}
75
76 == colors*.css ==
77
78 This is the place where the skin gets painted. Without this file, the skin should be black and white only (except the blue links). Font color, background, border color.
79
80 {{code language="css"}}
81 .heading-1, .heading-1-1, .heading-1-1-1, .heading-1-1-1-1 {
82 color: #369;
83 }
84 ul.xwikiintra{
85 border-bottom-color: #DDD;
86 background-color: #EEE;
87 }
88 ...
89 {{/code}}
90
91 == elements.css ==
92
93 {{version since="16.0.0"}}
94 This file is not available in xwiki-platform anymore, its content has been moved to a few different files:
95 * {{code}}type.less{{/code}} for typographic styles, such as title size and generic text mixins.
96 * Color Themes for admin defined styles, such as text color and font-family.
97 {{/version}}
98
99 {{version before="16.0.0"}}
100
101
102 This stylesheet is intended to provide general design rules regarding the html elements. For example, default font size and family for headings, underline for links, etc. You can get a blank version of this stylesheet at [[this address>>http://www.webproducer.at/lab/elements.css]]. It should not provide color properties. It looks like this:
103
104 {{code language="css"}}
105 body {
106 margin: 0;
107 padding: 0em;
108 font-size: 90.01%;
109 line-height: 1.25em;
110 background: white;
111 color: black;
112 font-family: "Arial", "Lucida", "Trebuchet MS", "Luxi Sans", "Helvetica", sans-serif;
113 }
114 h1 {
115 font-size: 1.5em;
116 line-height: 1.33em;
117 margin: 0.89em 0;
118 }
119 ul {
120 margin: 1em 0;
121 padding: 0 0 0 2.5em;
122 }
123 ...
124 {{/code}}
125
126 {{/version}}
127
128 = Special purpose files =
129
130 == rss.css ==
131
132 A few rules to format how the profile rss is displayed.
133
134 == microformats.css ==
135
136 Stylesheet to format the different microformats-enabled pages (user profile, blog, calendar...).
137
138 == chwSkin.css ==
139
140 Formatting for the Chart Wizard.
141
142 == tdwSkin.css ==
143
144 Formatting the Table Datasource Wizard (part of Chart Wizard).
145
146 == print.css ==
147
148 Formatting for the @media print.
149
150 = Deprecated (soon to be removed) =
151
152 == wiki.css ==
153
154 It was supposed to format wiki generated syntax, like .wikilink and .heading-1-1.
155
156 == xwiki.css ==
157
158 It was one of the few files holding css (stage 1).
159
160 == ie.css ==
161
162 Some old hacks to make the default skin work in IE too.
163
164 == style1/2/3.css ==
165
166 Variants of the 'default' skin, with green, pink and yellow colors.
167
168 == temp.css ==
169
170 Used for some tests.
171
172 = Possibly usable files =
173
174 //if somebody makes the skin wizard//
175
176 == customlayout.css ==
177
178 A dynamic version of ##screenlayout.css## using properties defined in a skin object. Should be parsed by velocity.
179
180 == customcolors.css ==
181
182 Same, but for colors.

Get Connected