Mercurial > hg
comparison doc/style.css @ 9794:ec8533806e27
doc: styles for man page, which suit with the mercurial website
designed loosely based on:
http://mercurial.selenic.com/css/styles.css
with some modifications by intention:
* visited links are colored differently
* no fixed size
* works without typeface.js
we keep most styles, which is from docutils, untouched.
tested with:
* MSIE 6.0 on Windows
* Firefox 3.5 on Linux
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 09 Nov 2009 00:00:47 +0900 |
parents | d1aa5393bef4 |
children | 1ca6314205f3 |
comparison
equal
deleted
inserted
replaced
9793:d2006e6d1d59 | 9794:ec8533806e27 |
---|---|
1 /* | |
2 * Styles for man pages, which suit with http://mercurial.selenic.com/ | |
3 * | |
4 * Color scheme & layout are borrowed from | |
5 * http://mercurial.selenic.com/css/styles.css | |
6 * | |
7 * Some styles are from html4css1.css from Docutils, which is in the | |
8 * public domain. | |
9 */ | |
1 | 10 |
2 body { | 11 body { |
3 font-family: sans-serif; | 12 margin: 0; |
4 /* adjustment for tt padding */ | 13 padding: 0; |
5 line-height: 140%; | 14 font-family: sans-serif; |
6 } | 15 color: #111; |
7 | 16 } |
8 tt, pre { | 17 |
9 background-color: #EEE; | 18 .document { |
10 border: thin solid #CCC; | 19 position: relative; /* be a top of absolute positioning */ |
11 padding: 1px; | 20 margin: 1.5em 1.8em; |
12 } | 21 padding: 0; |
13 | 22 line-height: 1.3; |
14 pre { | 23 } |
15 padding: 0.25em; | 24 |
16 } | 25 /* layout: toc to right */ |
17 | 26 #contents { |
18 #contents tt, h2 tt { | 27 position: absolute; |
19 background-color: inherit; | 28 right: 0; |
20 border: inherit; | 29 top: 0; |
21 } | 30 width: 26%; |
22 | 31 } |
23 /* styles taken from html4css1.css from Docutils, which is in the | 32 |
24 public domain */ | 33 /* layout: others to left */ |
25 | 34 h1.title, h2.subtitle, .section { width: 72%; } |
26 /* used to remove borders from tables and images */ | 35 .section .section { width: auto; } |
27 .borderless, table.borderless td, table.borderless th { | 36 table.docinfo { max-width: 72%; } |
28 border: 0; | 37 |
29 } | 38 /* headings */ |
39 h1, h2, .topic-title, .admonition-title { | |
40 font-family: "MgOpen Cosmetica", "Lucida Sans Unicode", sans-serif; | |
41 font-weight: normal; | |
42 } | |
43 h1, h2, .topic-title, .admonition-title { | |
44 margin: 1em 0 0.5em; | |
45 } | |
46 h1.title { font-size: 300%; } | |
47 h2.subtitle, h1 { font-size: 200%; } | |
48 h2, .topic-title, .admonition-title { font-size: 140%; } | |
49 | |
50 /* override first/last margin */ | |
51 .first, h1.title, h2.subtitle { margin-top: 0 !important; } | |
52 .last, .with-subtitle { margin-bottom: 0 !important; } | |
53 | |
54 blockquote, pre, dd .option-list, .field-list { | |
55 margin: 0.2em 0 1em 2em; | |
56 } | |
57 | |
58 kbd, tt, pre { font-family: monospace; } | |
59 | |
60 dt { font-weight: bold; } | |
61 dd { margin-bottom: 0.5em; } | |
62 | |
63 th, td { padding: 0.1em 0.2em; border: 0 none; } | |
64 th { font-weight: bold; text-align: left; } | |
65 | |
66 a:link, a:visited { text-decoration: underline; } | |
67 a:hover, a:focus { text-decoration: none; } | |
68 a:link { color: #00b5f1; } | |
69 a:visited { color: #5c9caf; } | |
70 a:link.toc-backref, a:visited.toc-backref { | |
71 text-decoration: none; | |
72 color: #111; /* `inherit' not supported by IE6 */ | |
73 } | |
74 | |
75 div.admonition, div.attention, div.caution, | |
76 div.danger, div.error, div.hint, div.important, | |
77 div.note, div.tip, div.warning { | |
78 border-top: 1px #ccc solid; | |
79 border-bottom: 1px #ccc solid; | |
80 padding: 0.3em 1em; | |
81 margin: 1em; | |
82 } | |
83 | |
84 | |
85 /* | |
86 * The following styles are from docutils'. | |
87 * Please refine if necessary. | |
88 */ | |
30 | 89 |
31 table.borderless td, table.borderless th { | 90 table.borderless td, table.borderless th { |
32 /* Override padding for "table.docutils td" with "! important". | 91 /* Override padding for "table.docutils td" with "! important". |
33 The right padding separates the table cells. */ | 92 The right padding separates the table cells. */ |
34 padding: 0 0.5em 0 0 ! important; | 93 padding: 0 0.5em 0 0 ! important; |
35 } | 94 } |
36 | 95 |
37 .first { | |
38 /* Override more specific margin styles with "! important". */ | |
39 margin-top: 0 ! important; | |
40 } | |
41 | |
42 .last, .with-subtitle { | |
43 margin-bottom: 0 ! important; | |
44 } | |
45 | |
46 .hidden { | 96 .hidden { |
47 display: none; | 97 display: none; |
48 } | 98 } |
49 | 99 |
50 a.toc-backref { | |
51 text-decoration: none; | |
52 color: black; | |
53 } | |
54 | |
55 blockquote.epigraph { | 100 blockquote.epigraph { |
56 margin: 2em 5em;; | 101 margin: 2em 5em; |
57 } | 102 } |
58 | |
59 dl.docutils dd { | |
60 margin-bottom: 0.5em; | |
61 } | |
62 | |
63 /* Uncomment (and remove this text!) to get bold-faced definition list terms | |
64 dl.docutils dt { | |
65 font-weight: bold; | |
66 } | |
67 */ | |
68 | 103 |
69 div.abstract { | 104 div.abstract { |
70 margin: 2em 5em; | 105 margin: 2em 5em; |
71 } | 106 } |
72 | |
73 div.abstract p.topic-title { | |
74 font-weight: bold; | |
75 text-align: center; | |
76 } | |
77 | |
78 div.admonition, div.attention, div.caution, div.danger, div.error, | |
79 div.hint, div.important, div.note, div.tip, div.warning { | |
80 margin: 2em; | |
81 border: medium outset; | |
82 padding: 1em; | |
83 } | |
84 | |
85 div.admonition p.admonition-title, div.hint p.admonition-title, | |
86 div.important p.admonition-title, div.note p.admonition-title, | |
87 div.tip p.admonition-title { | |
88 font-weight: bold; | |
89 font-family: sans-serif; | |
90 } | |
91 | |
92 div.attention p.admonition-title, div.caution p.admonition-title, | |
93 div.danger p.admonition-title, div.error p.admonition-title, | |
94 div.warning p.admonition-title { | |
95 color: red; | |
96 font-weight: bold; | |
97 font-family: sans-serif; | |
98 } | |
99 | |
100 /* Uncomment (and remove this text!) to get reduced vertical space in | |
101 compound paragraphs. | |
102 div.compound .compound-first, div.compound .compound-middle { | |
103 margin-bottom: 0.5em; | |
104 } | |
105 | |
106 div.compound .compound-last, div.compound .compound-middle { | |
107 margin-top: 0.5em; | |
108 } | |
109 */ | |
110 | 107 |
111 div.dedication { | 108 div.dedication { |
112 margin: 2em 5em; | 109 margin: 2em 5em; |
113 text-align: center; | 110 text-align: center; |
114 font-style: italic; | 111 font-style: italic; |
115 } | |
116 | |
117 div.dedication p.topic-title { | |
118 font-weight: bold; | |
119 font-style: normal; | |
120 } | 112 } |
121 | 113 |
122 div.figure { | 114 div.figure { |
123 margin-left: 2em; | 115 margin-left: 2em; |
124 margin-right: 2em; | 116 margin-right: 2em; |
172 div.system-message p.system-message-title { | 164 div.system-message p.system-message-title { |
173 color: red; | 165 color: red; |
174 font-weight: bold; | 166 font-weight: bold; |
175 } | 167 } |
176 | 168 |
177 div.topic { | |
178 margin: 2em; | |
179 } | |
180 | |
181 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, | 169 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, |
182 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { | 170 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { |
183 margin-top: 0.4em; | 171 margin-top: 0.4em; |
184 } | |
185 | |
186 h1.title { | |
187 text-align: center; | |
188 } | |
189 | |
190 h2.subtitle { | |
191 text-align: center; | |
192 } | 172 } |
193 | 173 |
194 hr.docutils { | 174 hr.docutils { |
195 width: 75%; | 175 width: 75%; |
196 } | 176 } |
250 font-size: larger; | 230 font-size: larger; |
251 color: maroon; | 231 color: maroon; |
252 text-align: center; | 232 text-align: center; |
253 } | 233 } |
254 | 234 |
255 p.sidebar-title { | |
256 font-family: sans-serif; | |
257 font-weight: bold; | |
258 font-size: larger; | |
259 } | |
260 | |
261 p.sidebar-subtitle { | |
262 font-family: sans-serif; | |
263 font-weight: bold; | |
264 } | |
265 | |
266 p.topic-title { | |
267 font-weight: bold; | |
268 } | |
269 | |
270 pre.address { | 235 pre.address { |
271 margin-bottom: 0; | 236 margin-bottom: 0; |
272 margin-top: 0; | 237 margin-top: 0; |
273 font-family: serif; | 238 font-family: serif; |
274 font-size: 100%; | 239 font-size: 100%; |
313 table.citation { | 278 table.citation { |
314 border-left: solid 1px gray; | 279 border-left: solid 1px gray; |
315 margin-left: 1px; | 280 margin-left: 1px; |
316 } | 281 } |
317 | 282 |
318 table.docinfo { | |
319 margin: 2em 4em; | |
320 } | |
321 | |
322 table.docutils { | |
323 margin-top: 0.5em; | |
324 margin-bottom: 0.5em; | |
325 } | |
326 | |
327 table.footnote { | 283 table.footnote { |
328 border-left: solid 1px black; | 284 border-left: solid 1px black; |
329 margin-left: 1px; | 285 margin-left: 1px; |
330 } | 286 } |
331 | 287 |
332 table.docutils td, table.docutils th, | |
333 table.docinfo td, table.docinfo th { | |
334 padding-left: 0.5em; | |
335 padding-right: 0.5em; | |
336 vertical-align: top; | |
337 } | |
338 | |
339 table.docutils th.field-name, table.docinfo th.docinfo-name { | |
340 font-weight: bold; | |
341 text-align: left; | |
342 white-space: nowrap; | |
343 padding-left: 0; | |
344 } | |
345 | |
346 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, | 288 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, |
347 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { | 289 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { |
348 font-size: 100%; | 290 font-size: 100%; |
349 } | 291 } |
350 | 292 |