Wiki source code of CSS Files

Last modified by Lucas Charpentier (Sereza7) on 2024/11/18

Hide last authors
Manuel Smeria 2.2 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
agoncal 1.1 4
Simon Urli 4.2 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.
agoncal 1.1 6
Manuel Smeria 2.2 7 = Core files =
agoncal 1.2 8
Manuel Smeria 2.2 9 == style.css ==
Manuel Smeria 2.1 10
Manuel Smeria 2.2 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:
Manuel Smeria 2.1 12
Manuel Smeria 2.2 13 {{code language="css"}}
agoncal 1.3 14 @import "classes.css";
15 @import "colorsblack.css";
16 @import "elements.css";
17 @import "presentation.css";
18 @import "screenlayout.css";
19 ...
Manuel Smeria 2.1 20 {{/code}}
agoncal 1.1 21
Lucas Charpentier (Sereza7) 4.3 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
Lucas Charpentier (Sereza7) 6.2 24 = Special purpose files =
25
26 == microformats.css ==
27
28 Stylesheet to format the different microformats-enabled pages (user profile, blog, calendar...).
29
30 == print.css ==
31
32 Formatting for the @media print.
33
Lucas Charpentier (Sereza7) 6.1 34 = Legacy files =
Manuel Smeria 2.1 35
Lucas Charpentier (Sereza7) 6.1 36 Those files used to be important CSS files used in XWiki. With the move to Flamingo ColorThemes with Bootstrap and LESS, the style structure we use got updated and those files are not in the codebase anymore as of 16.10.0 .
Manuel Smeria 2.1 37
Manuel Smeria 2.2 38 == classes.css ==
Manuel Smeria 2.1 39
Manuel Smeria 2.2 40 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:
Manuel Smeria 2.1 41
Manuel Smeria 2.2 42 {{code language="css"}}
agoncal 1.3 43 .xwikisep, .xwikisep2 {
44 display: none;
45 }
46 .clear, .clearfloats {
47 clear: both;
48 }
49 .none, .hidden {
50 display: none;
51 }
52 ...
Manuel Smeria 2.1 53 {{/code}}
agoncal 1.1 54
Manuel Smeria 2.2 55 == screenlayout.css ==
Manuel Smeria 2.1 56
57 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...).
58
Manuel Smeria 2.2 59 {{code language="css"}}
agoncal 1.3 60 body#body{
61 width: 100%;
62 padding: 0;
63 margin: 0 ;
64 min-width: 760px;
65 }
66 .minwidth, .minwidthb, .minwidthc{
67 width: 720px;
68 height: 0px;
69 }
70 .minwidthc{
71 width: 438px;
72 }
73 ...
Manuel Smeria 2.1 74 {{/code}}
agoncal 1.2 75
Manuel Smeria 2.2 76 == presentation.css ==
Manuel Smeria 2.1 77
Manuel Smeria 2.2 78 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.).
Manuel Smeria 2.1 79
Manuel Smeria 2.2 80 {{code language="css"}}
agoncal 1.3 81 .box,
82 .main-content {
83 margin: 0.5em;
84 }
85 ...
Manuel Smeria 2.1 86 {{/code}}
agoncal 1.2 87
Manuel Smeria 2.2 88 == colors*.css ==
Manuel Smeria 2.1 89
Manuel Smeria 2.2 90 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.
Manuel Smeria 2.1 91
Manuel Smeria 2.2 92 {{code language="css"}}
agoncal 1.3 93 .heading-1, .heading-1-1, .heading-1-1-1, .heading-1-1-1-1 {
94 color: #369;
95 }
96 ul.xwikiintra{
97 border-bottom-color: #DDD;
98 background-color: #EEE;
99 }
100 ...
Manuel Smeria 2.1 101 {{/code}}
agoncal 1.2 102
Lucas Charpentier (Sereza7) 4.4 103 == elements.css ==
Lucas Charpentier (Sereza7) 4.5 104
105 {{version since="16.0.0"}}
106 This file is not available in xwiki-platform anymore, its content has been moved to a few different files:
Lucas Charpentier (Sereza7) 4.4 107 * {{code}}type.less{{/code}} for typographic styles, such as title size and generic text mixins.
108 * Color Themes for admin defined styles, such as text color and font-family.
109 {{/version}}
Lucas Charpentier (Sereza7) 4.5 110
Lucas Charpentier (Sereza7) 4.4 111 {{version before="16.0.0"}}
112
113
114 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:
115
116 {{code language="css"}}
117 body {
118 margin: 0;
119 padding: 0em;
120 font-size: 90.01%;
121 line-height: 1.25em;
122 background: white;
123 color: black;
124 font-family: "Arial", "Lucida", "Trebuchet MS", "Luxi Sans", "Helvetica", sans-serif;
125 }
126 h1 {
127 font-size: 1.5em;
128 line-height: 1.33em;
129 margin: 0.89em 0;
130 }
131 ul {
132 margin: 1em 0;
133 padding: 0 0 0 2.5em;
134 }
135 ...
136 {{/code}}
137
138 {{/version}}
139
Manuel Smeria 2.2 140 = Deprecated (soon to be removed) =
agoncal 1.2 141
Lucas Charpentier (Sereza7) 5.1 142 As of 16.10.0-RC1, all the files that were in this section got removed (most of them had their content moved inside a StyleSheetExtension object).
Manuel Smeria 2.1 143
Manuel Smeria 2.2 144 = Possibly usable files =
Manuel Smeria 2.1 145
146 //if somebody makes the skin wizard//
147
Manuel Smeria 2.2 148 == customlayout.css ==
Manuel Smeria 2.1 149
Manuel Smeria 2.2 150 A dynamic version of ##screenlayout.css## using properties defined in a skin object. Should be parsed by velocity.
Manuel Smeria 2.1 151
Manuel Smeria 2.2 152 == customcolors.css ==
Manuel Smeria 2.1 153
Manuel Smeria 2.2 154 Same, but for colors.

Get Connected