Filippo Diotalevi | b4c8e3e | 2009-10-13 12:55:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | |
| 3 | Copyright (c) 2005 Hakon Wium Lie and Bert Bos |
| 4 | |
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | of this software and associated documentation files (the "Software"), to deal |
| 7 | in the Software without restriction, including without limitation the rights |
| 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | copies of the Software, and to permit persons to whom the Software is |
| 10 | furnished to do so, subject to the following conditions: |
| 11 | |
| 12 | The above copyright notice and this permission notice shall be included in |
| 13 | all copies or substantial portions of the Software. |
| 14 | |
| 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 21 | THE SOFTWARE. |
| 22 | |
| 23 | */ |
| 24 | html { |
| 25 | margin: 0; padding: 0; |
| 26 | font: 10pt/1.26 "Gill Sans", sans-serif; |
| 27 | } |
| 28 | |
| 29 | h1, h2, h3, h4, h5, h6 { |
| 30 | font-family: "Gill Sans", sans-serif; |
| 31 | margin: 2em 0 0.5em 0; |
| 32 | page-break-after: avoid; |
| 33 | } |
| 34 | |
| 35 | h1 { |
| 36 | font-size: 2.0em; |
| 37 | font-weight: 900; |
| 38 | |
| 39 | margin: 0; |
| 40 | margin-left:-2cm; |
| 41 | margin-top:-1cm; |
| 42 | margin-bottom:1.5cm; |
| 43 | top: 0cm; |
| 44 | left: 0cm; |
| 45 | padding: 2cm; |
| 46 | padding-top: 0cm; |
| 47 | padding-bottom: 1cm; |
| 48 | background: #888; |
| 49 | border-bottom-right-radius: 2cm; |
| 50 | page-break-before: always; |
| 51 | page-break-inside: avoid; |
| 52 | } |
| 53 | |
| 54 | @media screen, handheld { |
| 55 | h1 { |
| 56 | margin-top:1cm; |
| 57 | background-image: url("chapter-rounded-bottom.png"); |
| 58 | background-repeat: no-repeat; |
| 59 | background-position: bottom right; |
| 60 | } |
| 61 | div.page-reset > h1 { |
| 62 | margin-top:0cm; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | |
| 67 | h2 { |
| 68 | font-size: 1.2em; |
| 69 | text-transform: uppercase; |
| 70 | font-weight: bold; |
| 71 | } |
| 72 | |
| 73 | h3 { |
| 74 | font-size: 1em; |
| 75 | font-weight: bold; |
| 76 | } |
| 77 | |
| 78 | q::before { |
| 79 | content: "\201C"; |
| 80 | } |
| 81 | |
| 82 | q::after { |
| 83 | content: "\201D"; |
| 84 | } |
| 85 | |
| 86 | p { margin: 0 } |
| 87 | p + p { text-indent: 1.3em ; margin-top: 0.2em; } |
| 88 | p.sidenote + p, p.caption, p.art { text-indent: 0 } |
| 89 | |
| 90 | p.author { |
| 91 | margin-top: 2em; |
| 92 | text-indent: 0; |
| 93 | text-align: right; |
| 94 | } |
| 95 | |
| 96 | a { text-decoration: none; color: black } |
| 97 | |
| 98 | /* cross-references */ |
| 99 | |
| 100 | a.pageref::after { content: " on page " target-counter(attr(href), page); } |
| 101 | a.chapref::before { content: " Chapter " target-counter(attr(href), chapter) ", "; } |
| 102 | a.figref { content: " Figure " target-counter(attr(href), figure); } |
| 103 | a.tableref { content: " Table " target-counter(attr(href), figure); } |
| 104 | a.listingref { content: " Listing " target-counter(attr(href), listing); } |
| 105 | |
| 106 | /* sidenotes */ |
| 107 | |
| 108 | .sidenote { |
| 109 | float: left; |
| 110 | clear: left; |
| 111 | margin: 0 0 1em -41%; |
| 112 | width: 37%; |
| 113 | font-size: 0.9em; |
| 114 | font-style: normal; |
| 115 | text-indent: 0; |
| 116 | text-align: right; |
| 117 | page-break-inside: avoid; |
| 118 | } |
| 119 | |
| 120 | /* sidebars */ |
| 121 | |
| 122 | div.sidebar { |
| 123 | float: top-next; |
| 124 | margin: 1.2em 0 1.2em 0; |
| 125 | border: thin solid; |
| 126 | background: #CCC; |
| 127 | padding: 0.5em 1em; |
| 128 | page-break-inside: avoid; |
| 129 | column-count: 2; |
| 130 | column-gap: 1.5em; |
| 131 | } |
| 132 | |
| 133 | div.sidebar h2 { |
| 134 | margin-top: 0; |
| 135 | } |
| 136 | |
| 137 | /* frontpage */ |
| 138 | |
| 139 | .title p{ |
| 140 | font-size:22pt; |
| 141 | font-family: "Gill Sans", sans-serif; |
| 142 | text-align: center; |
| 143 | } |
| 144 | |
| 145 | .copyright-section { |
| 146 | text-align: center; |
| 147 | font-size: 9pt; |
| 148 | page-break-after: always; |
| 149 | margin-top: 50pt; |
| 150 | margin-bottom: 20pt; |
| 151 | } |
| 152 | |
| 153 | .toc-title { |
| 154 | font-size:18pt; |
| 155 | font-family: "Gill Sans", sans-serif; |
| 156 | text-align: left; |
| 157 | margin-left:20pt; |
| 158 | margin-bottom: 40pt; |
| 159 | |
| 160 | } |
| 161 | |
| 162 | /* figures, tables, and listings */ |
| 163 | |
| 164 | div.confluenceTableSmall th.confluenceTh { |
| 165 | font-size: 11px; |
| 166 | } |
| 167 | |
| 168 | div.confluenceTableSmall td.confluenceTd { |
| 169 | font-size: 7px; |
| 170 | } |
| 171 | |
| 172 | div.figure { |
| 173 | margin: 1em 0; |
| 174 | counter-increment: figure; |
| 175 | } |
| 176 | |
| 177 | div.figure .caption, div.table .caption { |
| 178 | font-size: 0.9em; |
| 179 | font-style: italic; |
| 180 | } |
| 181 | |
| 182 | div.figure .caption::before { |
| 183 | content: "Figure " counter(figure) ". "; |
| 184 | font-weight: bold; |
| 185 | font-style: normal; |
| 186 | } |
| 187 | |
| 188 | div.table .caption::before { |
| 189 | content: "Table " counter(table) ". "; |
| 190 | font-weight: bold; |
| 191 | font-style: normal; |
| 192 | } |
| 193 | |
| 194 | div.table { |
| 195 | margin: 1em 0; |
| 196 | counter-increment: table; |
| 197 | } |
| 198 | |
| 199 | div.table th { |
| 200 | text-align: left; |
| 201 | } |
| 202 | |
| 203 | table th, table td { |
| 204 | text-align: left; |
| 205 | padding-right: 1em; |
| 206 | page-break-inside: avoid; |
| 207 | } |
| 208 | |
| 209 | table th { |
| 210 | border-top: thin solid; |
| 211 | border-bottom: thin solid; |
| 212 | padding-top: 0.2em; |
| 213 | padding-bottom: 0.2em; |
| 214 | } |
| 215 | table td { |
| 216 | border-top: none; |
| 217 | border-bottom: thin dotted; |
| 218 | padding-top: 0.2em; |
| 219 | padding-bottom: 0.2em; |
| 220 | } |
| 221 | |
| 222 | div.Scrollbar { |
| 223 | display: none; |
| 224 | } |
| 225 | |
| 226 | |
| 227 | /* Weird div.codeHeader a b::before would be a better selection |
| 228 | but prince does not properly match it.. Firefox does. */ |
| 229 | div.codeHeader::before { |
| 230 | content: "Listing " counter(listing) ". "; |
| 231 | font-weight: bold; |
| 232 | font-style: normal; |
| 233 | } |
| 234 | div.codeHeader a b { |
| 235 | font-style: italic; |
| 236 | font-weight: normal; |
| 237 | } |
| 238 | div.codeHeader { |
| 239 | font-size: 0.9em; |
| 240 | counter-increment: listing; |
| 241 | } |
| 242 | div.code { |
| 243 | border: 1px dashed #c0c0c0; |
| 244 | font-size: 12px; |
| 245 | font-family: Courier; |
| 246 | margin: 5px; |
| 247 | line-height: 13px; |
| 248 | padding: 3px; |
| 249 | background-color: #f8f8f8; |
| 250 | |
| 251 | } |
| 252 | |
| 253 | |
| 254 | @page { |
| 255 | margin: 2cm; |
| 256 | size: 7in 9.25in; |
| 257 | |
| 258 | @footnotes { |
| 259 | border-top: thin solid black; |
| 260 | padding-top: 0.3em; |
| 261 | margin-top: 0.6em; |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | |
| 266 | /* define default page and names pages: cover, blank, frontmatter */ |
| 267 | div.page-reset { |
| 268 | counter-reset: page 1; |
| 269 | } |
| 270 | |
| 271 | @page :left { |
| 272 | @top-left-corner { |
| 273 | font-weight: 900; font: 9pt "Gill Sans", serif; |
| 274 | content: counter(page); |
| 275 | text-align: left; |
| 276 | margin-left: 1cm; |
| 277 | visibility: hidden; |
| 278 | } |
| 279 | @top-left { |
| 280 | font-weight: 900; |
| 281 | font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em; |
| 282 | content: string(header, first); |
| 283 | visibility: hidden; |
| 284 | } |
| 285 | @bottom-left-corner { |
| 286 | font-weight: 900; font: 9pt "Gill Sans", serif; |
| 287 | content: counter(page); |
| 288 | text-align: left; |
| 289 | margin-left: 1cm; |
| 290 | } |
| 291 | @bottom-left { |
| 292 | font-weight: 900; |
| 293 | font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em; |
| 294 | content: string(header, first); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | @page :right { |
| 299 | @top-right-corner { |
| 300 | font-weight: 900; font: 9pt "Gill Sans", serif; |
| 301 | content: counter(page); |
| 302 | text-align: left; |
| 303 | margin-left: 1cm; |
| 304 | visibility: hidden; |
| 305 | } |
| 306 | @top-right { |
| 307 | font-weight: 900; |
| 308 | font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em; |
| 309 | content: string(header, first) |
| 310 | visibility: hidden; |
| 311 | } |
| 312 | @bottom-right-corner { |
| 313 | font-weight: 900; font: 9pt "Gill Sans", serif; |
| 314 | content: counter(page); |
| 315 | text-align: right; |
| 316 | margin-right: 1cm; |
| 317 | } |
| 318 | @bottom-right { |
| 319 | font-weight: 900; font: 9pt "Gill Sans", serif; |
| 320 | white-space: pre; text-transform: uppercase; letter-spacing: 0.1em; |
| 321 | content: string(header, first) |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | /* |
| 326 | In theory we should be able to use the :first selector so taht |
| 327 | we can put the page numbering on the bottom of the first page of the chapter |
| 328 | but have the rest of the pages number at the top. But this does not seem |
| 329 | to work. See http://www.princexml.com/doc/6.0/page-selectors/ |
| 330 | |
| 331 | So for now just always number at the bottom :( |
| 332 | */ |
| 333 | /* |
| 334 | div.chapter { page: bottom-number; } |
| 335 | @page bottom-number :first { |
| 336 | @top-left { |
| 337 | visibility: hidden; |
| 338 | } |
| 339 | @bottom-left { |
| 340 | visibility: visible; |
| 341 | } |
| 342 | @top-right { |
| 343 | visibility: hidden; |
| 344 | } |
| 345 | @bottom-right { |
| 346 | visibility: visible; |
| 347 | } |
| 348 | } |
| 349 | */ |
| 350 | |
| 351 | @page cover { margin: 0; } |
| 352 | |
| 353 | @page frontmatter :left { |
| 354 | @bottom-left-corner { |
| 355 | content: counter(page, lower-roman); |
| 356 | } |
| 357 | @bottom-left-corner { |
| 358 | content: counter(page, lower-roman); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | @page frontmatter :right { |
| 363 | @bottom-right-corner { |
| 364 | content: counter(page, lower-roman); |
| 365 | } |
| 366 | @bottom-right-corner { |
| 367 | content: counter(page, lower-roman); |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | @page blank :left { |
| 372 | @top-left { visibility: hidden; } |
| 373 | @bottom-left { visibility: hidden; } |
| 374 | @top-left-corner { visibility: hidden; } |
| 375 | @bottom-left-corner { visibility: hidden; } |
| 376 | } |
| 377 | |
| 378 | @page blank :right { |
| 379 | @top-right { visibility: hidden; } |
| 380 | @bottom-right { visibility: hidden; } |
| 381 | @top-right-corner { visibility: hidden; } |
| 382 | @bottom-right-corner { visibility: hidden; } |
| 383 | } |
| 384 | |
| 385 | /* footnotes */ |
| 386 | .footnote { |
| 387 | display: none; /* default rule */ |
| 388 | |
| 389 | display: prince-footnote; /* prince-specific rules */ |
| 390 | position: footnote; |
| 391 | footnote-style-position: inside; |
| 392 | |
| 393 | counter-increment: footnote; |
| 394 | margin-left: 1.4em; |
| 395 | font-size: 90%; |
| 396 | line-height: 1.4; |
| 397 | } |
| 398 | |
| 399 | .footnote::footnote-call { |
| 400 | vertical-align: super; |
| 401 | font-size: 80%; |
| 402 | } |
| 403 | |
| 404 | .footnote::footnote-marker { |
| 405 | vertical-align: super; |
| 406 | color: green; |
| 407 | padding-right: 0.4em; |
| 408 | } |
| 409 | |
| 410 | /* Confluence contents to hide */ |
| 411 | #labels-section { |
| 412 | display: none; |
| 413 | } |
| 414 | #comments-section { |
| 415 | display: none; |
| 416 | } |
| 417 | #footer { |
| 418 | display: none; |
| 419 | } |
| 420 | .hidden { |
| 421 | display: none; |
| 422 | } |
| 423 | |
| 424 | /* |
| 425 | A book consists of different types of sections. We propose to use |
| 426 | DIV elements with these class names: |
| 427 | |
| 428 | frontcover |
| 429 | halftitlepage: contains the title of the book |
| 430 | titlepage: contains the title of the book, name of author(s) and publisher |
| 431 | imprint: left page with copyright, publisher, library printing information |
| 432 | dedication: right page with short dedication |
| 433 | foreword: written by someone other than the author(s) |
| 434 | toc: table of contents |
| 435 | preface: preface, including acknowledgements |
| 436 | chapter: each chapter is given its own DIV element |
| 437 | references: contains list of references |
| 438 | appendix: each appendix is given its own |
| 439 | bibliography |
| 440 | glossary |
| 441 | index |
| 442 | colophon: describes how the book was produced |
| 443 | backcover |
| 444 | |
| 445 | A book will use several of the types listed above, but few books |
| 446 | will use all of them. |
| 447 | */ |
| 448 | |
| 449 | /* which section uses which named page */ |
| 450 | |
| 451 | div.halftitlepage, div.titlepage, div.imprint, div.dedication { page: blank } |
| 452 | div.foreword, div.toc, div.preface { page: frontmatter } |
| 453 | |
| 454 | |
| 455 | /* page breaks */ |
| 456 | div.frontcover, div.halftitlepage, div.titlepage { page-break-before: right } |
| 457 | div.imprint { page-break-before: always; } |
| 458 | div.chapter { page-break-before: always; } |
| 459 | div.dedication, div.foreword, div.toc, div.preface, div.reference, |
| 460 | div.appendix, div.bibliography, div.glossary, div.index, div.colophon { |
| 461 | page-break-before: always |
| 462 | } |
| 463 | div.backcover { page-break-before: left } |
| 464 | |
| 465 | /* titlepage, halftitlepage */ |
| 466 | |
| 467 | div.titlepage h1, div.halftitlepage h1 { margin-bottom: 2em; } |
| 468 | div.titlepage h2, div.halftitlepage h2 { font-size: 1.2em; margin-bottom: 3em; } |
| 469 | div.titlepage h3, div.halftitlepage h3 { font-size: 1em; margin-bottom: 3em; } |
| 470 | div.titlepage p, div.halftitlepage p { |
| 471 | font-size: 1.4em; |
| 472 | font-weight: bold; |
| 473 | margin: 0; padding: 0; |
| 474 | } |
| 475 | |
| 476 | |
| 477 | /* TOC */ |
| 478 | |
| 479 | ul.toc, ul.toc ul { |
| 480 | list-style-type: none; |
| 481 | margin: 0; padding: 0; |
| 482 | margin-left: 3cm; |
| 483 | } |
| 484 | ul.toc ul { |
| 485 | margin-left: 1em; |
| 486 | font-weight: normal; |
| 487 | } |
| 488 | ul.toc > li { |
| 489 | font-weight: bold; |
| 490 | margin-bottom: 0.5em; |
| 491 | } |
| 492 | ul.toc a::after { |
| 493 | content: leader('.') target-counter(attr(href), page); |
| 494 | font-style: normal; |
| 495 | } |
| 496 | ul.toc > li.frontmatter a::after { |
| 497 | content: leader('.') target-counter(attr(href), page, lower-roman); |
| 498 | font-style: normal; |
| 499 | } |
| 500 | ul.toc > li.endmatter a::after { |
| 501 | content: leader('.') target-counter(attr(href), page); |
| 502 | font-style: normal; |
| 503 | } |
| 504 | ul.toc > li.chapter::before { |
| 505 | content: "Chapter " counter(toc-chapter, decimal); |
| 506 | display: block; |
| 507 | margin: 1em 0 0.1em -2.5cm; |
| 508 | font-weight: normal; |
| 509 | counter-increment: toc-chapter; |
| 510 | page-break-after: avoid; |
| 511 | } |
| 512 | |
| 513 | /* chapter numbers */ |
| 514 | |
| 515 | div.chapter { counter-increment: chapter; } |
| 516 | div.chapter h1::before { |
| 517 | text-transform: uppercase; |
| 518 | letter-spacing: 0.15em; |
| 519 | content: "Chapter " counter(chapter) " \A\B0 \B0 \B0 \B0\A"; |
| 520 | white-space: pre; |
| 521 | font-size: 50%; |
| 522 | } |
| 523 | |
| 524 | div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::before { |
| 525 | content: normal; /* that is, none */ |
| 526 | } |
| 527 | |
| 528 | h1 { string-set: header content();} |
| 529 | div.chapter h1 { string-set: header "Chapter " counter(chapter) " - " content(); } |
| 530 | |
| 531 | /* index */ |
| 532 | |
| 533 | ul.index { |
| 534 | list-style-type: none; |
| 535 | margin: 0; padding: 0; |
| 536 | column-count: 2; |
| 537 | column-gap: 1em; |
| 538 | } |
| 539 | |
| 540 | ul.index a::after { content: ", " target-counter(attr(href), page); } |
| 541 | |
| 542 | |
| 543 | span.element, span.attribute { |
| 544 | text-transform: uppercase; |
| 545 | font-weight: bold; |
| 546 | font-size: 80%; |
| 547 | } |
| 548 | span.property { font-weight: bold } |
| 549 | code, span.css, span.value, span.declaration { |
| 550 | font: 90% "Lucida Console", "Lucida Sans Typewriter", monospace; |
| 551 | } |
| 552 | |
| 553 | |
| 554 | @media screen, handheld { |
| 555 | html {font: 14px "Gill Sans", sans-serif; } |
| 556 | h1 { margin-bottom: 0.5em } |
| 557 | div.frontcover, div.halftitlepage, div.titlepage, div.imprint, |
| 558 | div.dedication, div.foreword, div.toc, div.index { display: none } |
| 559 | body { |
| 560 | margin: 0cm; |
| 561 | margin-left: 2cm; |
| 562 | margin-right: 2cm; |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | /* |
| 567 | * Enhancements to the take advantage of some of the style markup that |
| 568 | * Confluence generates |
| 569 | */ |
| 570 | a sup img { visibility: hidden; position: absolute;} |
| 571 | |
| 572 | img { |
| 573 | prince-image-resolution:150dpi; |
| 574 | } |
| 575 | |
| 576 | table { |
| 577 | font: "Lucida Console", "Lucida Sans Typewriter", monospace; |
| 578 | } |
| 579 | |
| 580 | table td { |
| 581 | font-size: 10pt; |
| 582 | } |
| 583 | |
| 584 | pre { |
| 585 | white-space: pre-wrap; |
| 586 | } |
| 587 | |
| 588 | .codeContent { |
| 589 | font-size: 80%; |
| 590 | } |
| 591 | .code { |
| 592 | } |
| 593 | .code-keyword { |
| 594 | color: #000091; |
| 595 | background-color: inherit; |
| 596 | } |
| 597 | |
| 598 | .code-object { |
| 599 | color: #910091; |
| 600 | background-color: inherit; |
| 601 | } |
| 602 | |
| 603 | .code-quote { |
| 604 | color: #009100; |
| 605 | background-color: inherit; |
| 606 | } |
| 607 | |
| 608 | .code-comment { |
| 609 | color: #808080; |
| 610 | background-color: inherit; |
| 611 | } |
| 612 | |
| 613 | |
| 614 | .code-xml .code-keyword { |
| 615 | color: inherit; |
| 616 | font-weight: bold; |
| 617 | } |
| 618 | |
| 619 | .code-tag { |
| 620 | color: #000091; |
| 621 | background-color: inherit; |
| 622 | } |
| 623 | |
| 624 | .noteMacro { border-color: #F0C000; background-color: #FFFFCE;} |
| 625 | .warningMacro { border-color: #CC0000; background-color: #FFCCCC } |
| 626 | .infoMacro { border-color: #3c78b5; background-color: #D8E4F1; } |
| 627 | .tipMacro { border-color: #090; background-color: #dfd;} |
| 628 | .noteMacro, .warningMacro, .infoMacro, .tipMacro, .informationMacroPadding { |
| 629 | border: thin solid; |
| 630 | float: top-next; |
| 631 | margin: 1em 0 1.2em 0; |
| 632 | padding: 0.5em; |
| 633 | column-count: 2; |
| 634 | column-gap: 1.5em; |
| 635 | width: 100%; |
| 636 | } |
| 637 | table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro td, table.sectionMacro td { |
| 638 | border: none; |
| 639 | } |
| 640 | table.infoMacro p, table.warningMacro p, table.tipMacro p, table.noteMacro p, table.sectionMacro p { |
| 641 | font-size:x-small; |
| 642 | margin-top: 1em; |
| 643 | } |
| 644 | |