|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2019 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing CSS styles for the Markdown preview. |
|
8 """ |
|
9 |
|
10 ########################################################################### |
|
11 ## Styles for light window schemes below |
|
12 ########################################################################### |
|
13 |
|
14 css_markdown_light = """ |
|
15 html { |
|
16 background-color: #ffffff; |
|
17 } |
|
18 |
|
19 body { |
|
20 background-color: #ffffff; |
|
21 color: #000000; |
|
22 font-family: sans-serif; |
|
23 font-size:12px; |
|
24 line-height:1.7; |
|
25 word-wrap:break-word |
|
26 } |
|
27 |
|
28 body>*:first-child { |
|
29 margin-top:0 !important |
|
30 } |
|
31 |
|
32 body>*:last-child { |
|
33 margin-bottom:0 !important |
|
34 } |
|
35 |
|
36 a.absent { |
|
37 color:#c00 |
|
38 } |
|
39 |
|
40 a.anchor { |
|
41 display:block; |
|
42 padding-right:6px; |
|
43 padding-left:30px; |
|
44 margin-left:-30px; |
|
45 cursor:pointer; |
|
46 position:absolute; |
|
47 top:0; |
|
48 left:0; |
|
49 bottom:0 |
|
50 } |
|
51 |
|
52 a.anchor:focus { |
|
53 outline:none |
|
54 } |
|
55 |
|
56 tt, code, pre { |
|
57 font-family: Consolas, "Liberation Mono", Courier, monospace; |
|
58 font-size: 12px; |
|
59 } |
|
60 |
|
61 h1, h2, h3, h4, h5, h6 { |
|
62 margin:1em 0 6px; |
|
63 padding:0; |
|
64 font-weight:bold; |
|
65 line-height:1.7; |
|
66 cursor:text; |
|
67 position:relative |
|
68 } |
|
69 |
|
70 h1 .octicon-link, h2 .octicon-link, h3 .octicon-link, h4 .octicon-link, |
|
71 h5 .octicon-link, h6 .octicon-link { |
|
72 display:none; |
|
73 color: #000000; |
|
74 } |
|
75 |
|
76 h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, |
|
77 h5:hover a.anchor, h6:hover a.anchor { |
|
78 text-decoration:none; |
|
79 line-height:1; |
|
80 padding-left:8px; |
|
81 margin-left:-30px; |
|
82 top:15% |
|
83 } |
|
84 |
|
85 h1:hover a.anchor .octicon-link, h2:hover a.anchor .octicon-link, |
|
86 h3:hover a.anchor .octicon-link, h4:hover a.anchor .octicon-link, |
|
87 h5:hover a.anchor .octicon-link, h6:hover a.anchor .octicon-link { |
|
88 display:inline-block |
|
89 } |
|
90 |
|
91 h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, |
|
92 h5 tt, h5 code, h6 tt, h6 code { |
|
93 font-size:inherit |
|
94 } |
|
95 |
|
96 h1 { |
|
97 font-size:2em; |
|
98 border-bottom:1px solid #ddd |
|
99 } |
|
100 |
|
101 h2 { |
|
102 font-size:1.6em; |
|
103 border-bottom:1px solid #eee |
|
104 } |
|
105 |
|
106 h3 { |
|
107 font-size:1.4em |
|
108 } |
|
109 |
|
110 h4 { |
|
111 font-size:1.2em |
|
112 } |
|
113 |
|
114 h5 { |
|
115 font-size:1em |
|
116 } |
|
117 |
|
118 h6 { |
|
119 color:#777; |
|
120 font-size:1em |
|
121 } |
|
122 |
|
123 p, blockquote, ul, ol, dl, table, pre { |
|
124 margin:8px 0 |
|
125 } |
|
126 |
|
127 hr { |
|
128 background: rgba(216, 216, 216, 1); |
|
129 border: 0 none; |
|
130 color: #ccc; |
|
131 height: 2px; |
|
132 padding: 0; |
|
133 margin: 8px 0; |
|
134 } |
|
135 |
|
136 ul, ol { |
|
137 padding-left:15px |
|
138 } |
|
139 |
|
140 ul.no-list, ul.task-list, ol.no-list, ol.task-list { |
|
141 list-style-type:none; |
|
142 } |
|
143 |
|
144 ul ul, ul ol, ol ol, ol ul { |
|
145 margin-top:0; |
|
146 margin-bottom:0 |
|
147 } |
|
148 |
|
149 |
|
150 dl { |
|
151 padding:0 |
|
152 } |
|
153 |
|
154 dl dt { |
|
155 font-size:14px; |
|
156 font-weight:bold; |
|
157 font-style:italic; |
|
158 padding:0; |
|
159 margin-top:8px |
|
160 } |
|
161 |
|
162 dl dd { |
|
163 margin-bottom:15px; |
|
164 padding:0 8px |
|
165 } |
|
166 |
|
167 blockquote { |
|
168 border-left:4px solid #DDD; |
|
169 padding:0 8px; |
|
170 color:#777 |
|
171 } |
|
172 |
|
173 blockquote>:first-child { |
|
174 margin-top:0px |
|
175 } |
|
176 |
|
177 blockquote>:last-child { |
|
178 margin-bottom:0px |
|
179 } |
|
180 |
|
181 table { |
|
182 border-collapse: collapse; |
|
183 border-spacing: 0; |
|
184 overflow:auto; |
|
185 display:block |
|
186 } |
|
187 |
|
188 table th { |
|
189 font-weight:bold |
|
190 } |
|
191 |
|
192 table th, table td { |
|
193 border:1px solid #ddd; |
|
194 padding:3px 3px |
|
195 } |
|
196 |
|
197 table tr { |
|
198 border-top:1px solid #ccc; |
|
199 background-color: #ffffff; |
|
200 } |
|
201 |
|
202 table tr:nth-child(2n) { |
|
203 background-color:#f8f8f8; |
|
204 } |
|
205 |
|
206 img { |
|
207 max-width:100%; |
|
208 -moz-box-sizing:border-box; |
|
209 box-sizing:border-box |
|
210 } |
|
211 |
|
212 span.frame { |
|
213 display:block; |
|
214 overflow:hidden |
|
215 } |
|
216 |
|
217 span.frame>span { |
|
218 border:1px solid #ddd; |
|
219 display:block; |
|
220 float:left; |
|
221 overflow:hidden; |
|
222 margin:6px 0 0; |
|
223 padding:7px; |
|
224 width:auto |
|
225 } |
|
226 |
|
227 span.frame span img { |
|
228 display:block; |
|
229 float:left |
|
230 } |
|
231 |
|
232 span.frame span span { |
|
233 clear:both; |
|
234 color:#333333; |
|
235 display:block; |
|
236 padding:5px 0 0 |
|
237 } |
|
238 |
|
239 span.align-center { |
|
240 display:block; |
|
241 overflow:hidden; |
|
242 clear:both |
|
243 } |
|
244 |
|
245 span.align-center>span { |
|
246 display:block; |
|
247 overflow:hidden; |
|
248 margin:6px auto 0; |
|
249 text-align:center |
|
250 } |
|
251 |
|
252 span.align-center span img { |
|
253 margin:0 auto; |
|
254 text-align:center |
|
255 } |
|
256 |
|
257 span.align-right { |
|
258 display:block; |
|
259 overflow:hidden; |
|
260 clear:both |
|
261 } |
|
262 |
|
263 span.align-right>span { |
|
264 display:block; |
|
265 overflow:hidden; |
|
266 margin:6px 0 0; |
|
267 text-align:right |
|
268 } |
|
269 |
|
270 span.align-right span img { |
|
271 margin:0; |
|
272 text-align:right |
|
273 } |
|
274 |
|
275 span.float-left { |
|
276 display:block; |
|
277 margin-right:6px; |
|
278 overflow:hidden; |
|
279 float:left |
|
280 } |
|
281 |
|
282 span.float-left span { |
|
283 margin:6px 0 0 |
|
284 } |
|
285 |
|
286 span.float-right { |
|
287 display:block; |
|
288 margin-left:6px; |
|
289 overflow:hidden; |
|
290 float:right |
|
291 } |
|
292 |
|
293 span.float-right>span { |
|
294 display:block; |
|
295 overflow:hidden; |
|
296 margin:6px auto 0; |
|
297 text-align:right |
|
298 } |
|
299 |
|
300 code, tt { |
|
301 margin:0; |
|
302 border:1px solid #ddd; |
|
303 background-color:#f8f8f8; |
|
304 border-radius:3px; |
|
305 max-width:100%; |
|
306 display:inline-block; |
|
307 overflow:auto; |
|
308 vertical-align:middle; |
|
309 line-height:1.1; |
|
310 padding:0 |
|
311 } |
|
312 |
|
313 code:before, code:after, tt:before, tt:after { |
|
314 content:"\00a0" |
|
315 } |
|
316 |
|
317 code { |
|
318 white-space:nowrap |
|
319 } |
|
320 |
|
321 pre>code { |
|
322 margin:0; |
|
323 padding:0; |
|
324 white-space:pre; |
|
325 border:none; |
|
326 background:transparent |
|
327 } |
|
328 |
|
329 .highlight pre, pre { |
|
330 background-color:#f8f8f8; |
|
331 border:1px solid #ddd; |
|
332 font-size:12px; |
|
333 line-height:16px; |
|
334 overflow:auto; |
|
335 padding:6px 6px; |
|
336 border-radius:3px |
|
337 } |
|
338 |
|
339 pre { |
|
340 word-wrap:normal |
|
341 } |
|
342 |
|
343 pre code, pre tt { |
|
344 margin:0; |
|
345 padding:0; |
|
346 background-color:transparent; |
|
347 border:none; |
|
348 word-wrap:normal; |
|
349 max-width:initial; |
|
350 display:inline; |
|
351 overflow:initial; |
|
352 line-height:inherit |
|
353 } |
|
354 |
|
355 pre code:before, pre code:after, pre tt:before, pre tt:after { |
|
356 content:normal |
|
357 } |
|
358 |
|
359 kbd { |
|
360 border:1px solid gray; |
|
361 font-size:1.2em; |
|
362 box-shadow:1px 0 1px 0 #eee, 0 1px 0 1px #ccc, 0 2px 0 2px #444; |
|
363 -webkit-border-radius:2px; |
|
364 -moz-border-radius:2px; |
|
365 border-radius:2px; |
|
366 margin:2px 3px; |
|
367 padding:1px 5px; |
|
368 color: #000; |
|
369 background-color: #fff |
|
370 } |
|
371 """ |
|
372 |
|
373 |
|
374 css_pygments_light = """ |
|
375 pre .hll { background-color: #ffffcc } |
|
376 |
|
377 /* Comment */ |
|
378 pre .c { color: #999988; font-style: italic } |
|
379 |
|
380 /* Error */ |
|
381 pre .err { color: #a61717; background-color: #e3d2d2 } |
|
382 |
|
383 /* Keyword */ |
|
384 pre .k { font-weight: bold } |
|
385 |
|
386 /* Operator */ |
|
387 pre .o { font-weight: bold } |
|
388 |
|
389 /* Comment.Multiline */ |
|
390 pre .cm { color: #999988; font-style: italic } |
|
391 |
|
392 /* Comment.Preproc */ |
|
393 pre .cp { color: #999999; font-weight: bold; font-style: italic } |
|
394 |
|
395 /* Comment.Single */ |
|
396 pre .c1 { color: #999988; font-style: italic } |
|
397 |
|
398 /* Comment.Special */ |
|
399 pre .cs { color: #999999; font-weight: bold; font-style: italic } |
|
400 |
|
401 /* Generic.Deleted */ |
|
402 pre .gd { color: #000000; background-color: #ffdddd } |
|
403 |
|
404 /* Generic.Emph */ |
|
405 pre .ge { font-style: italic } |
|
406 |
|
407 /* Generic.Error */ |
|
408 pre .gr { color: #aa0000 } |
|
409 |
|
410 /* Generic.Heading */ |
|
411 pre .gh { color: #999999 } |
|
412 |
|
413 /* Generic.Inserted */ |
|
414 pre .gi { color: #000000; background-color: #ddffdd } |
|
415 |
|
416 /* Generic.Output */ |
|
417 pre .go { color: #888888 } |
|
418 |
|
419 /* Generic.Prompt */ |
|
420 pre .gp { color: #555555 } |
|
421 |
|
422 /* Generic.Strong */ |
|
423 pre .gs { font-weight: bold } |
|
424 |
|
425 /* Generic.Subheading */ |
|
426 pre .gu { color: #aaaaaa } |
|
427 |
|
428 /* Generic.Traceback */ |
|
429 pre .gt { color: #aa0000 } |
|
430 |
|
431 /* Keyword.Constant */ |
|
432 pre .kc { font-weight: bold } |
|
433 |
|
434 /* Keyword.Declaration */ |
|
435 pre .kd { font-weight: bold } |
|
436 |
|
437 /* Keyword.Namespace */ |
|
438 pre .kn { font-weight: bold } |
|
439 |
|
440 /* Keyword.Pseudo */ |
|
441 pre .kp { font-weight: bold } |
|
442 |
|
443 /* Keyword.Reserved */ |
|
444 pre .kr { font-weight: bold } |
|
445 |
|
446 /* Keyword.Type */ |
|
447 pre .kt { color: #445588; font-weight: bold } |
|
448 |
|
449 /* Literal.Number */ |
|
450 pre .m { color: #009999 } |
|
451 |
|
452 /* Literal.String */ |
|
453 pre .s { color: #d01040 } |
|
454 |
|
455 /* Name.Attribute */ |
|
456 pre .na { color: #008080 } |
|
457 |
|
458 /* Name.Builtin */ |
|
459 pre .nb { color: #0086B3 } |
|
460 |
|
461 /* Name.Class */ |
|
462 pre .nc { color: #445588; font-weight: bold } |
|
463 |
|
464 /* Name.Constant */ |
|
465 pre .no { color: #008080 } |
|
466 |
|
467 /* Name.Decorator */ |
|
468 pre .nd { color: #3c5d5d; font-weight: bold } |
|
469 |
|
470 /* Name.Entity */ |
|
471 pre .ni { color: #800080 } |
|
472 |
|
473 /* Name.Exception */ |
|
474 pre .ne { color: #990000; font-weight: bold } |
|
475 |
|
476 /* Name.Function */ |
|
477 pre .nf { color: #990000; font-weight: bold } |
|
478 |
|
479 /* Name.Label */ |
|
480 pre .nl { color: #990000; font-weight: bold } |
|
481 |
|
482 /* Name.Namespace */ |
|
483 pre .nn { color: #555555 } |
|
484 |
|
485 /* Name.Tag */ |
|
486 pre .nt { color: #000080 } |
|
487 |
|
488 /* Name.Variable */ |
|
489 pre .nv { color: #008080 } |
|
490 |
|
491 /* Operator.Word */ |
|
492 pre .ow { font-weight: bold } |
|
493 |
|
494 /* Text.Whitespace */ |
|
495 pre .w { color: #bbbbbb } |
|
496 |
|
497 /* Literal.Number.Float */ |
|
498 pre .mf { color: #009999 } |
|
499 |
|
500 /* Literal.Number.Hex */ |
|
501 pre .mh { color: #009999 } |
|
502 |
|
503 /* Literal.Number.Integer */ |
|
504 pre .mi { color: #009999 } |
|
505 |
|
506 /* Literal.Number.Oct */ |
|
507 pre .mo { color: #009999 } |
|
508 |
|
509 /* Literal.String.Backtick */ |
|
510 pre .sb { color: #d01040 } |
|
511 |
|
512 /* Literal.String.Char */ |
|
513 pre .sc { color: #d01040 } |
|
514 |
|
515 /* Literal.String.Doc */ |
|
516 pre .sd { color: #d01040 } |
|
517 |
|
518 /* Literal.String.Double */ |
|
519 pre .s2 { color: #d01040 } |
|
520 |
|
521 /* Literal.String.Escape */ |
|
522 pre .se { color: #d01040 } |
|
523 |
|
524 /* Literal.String.Heredoc */ |
|
525 pre .sh { color: #d01040 } |
|
526 |
|
527 /* Literal.String.Interpol */ |
|
528 pre .si { color: #d01040 } |
|
529 |
|
530 /* Literal.String.Other */ |
|
531 pre .sx { color: #d01040 } |
|
532 |
|
533 /* Literal.String.Regex */ |
|
534 pre .sr { color: #009926 } |
|
535 |
|
536 /* Literal.String.Single */ |
|
537 pre .s1 { color: #d01040 } |
|
538 |
|
539 /* Literal.String.Symbol */ |
|
540 pre .ss { color: #990073 } |
|
541 |
|
542 /* Name.Builtin.Pseudo */ |
|
543 pre .bp { color: #999999 } |
|
544 |
|
545 /* Name.Variable.Class */ |
|
546 pre .vc { color: #008080 } |
|
547 |
|
548 /* Name.Variable.Global */ |
|
549 pre .vg { color: #008080 } |
|
550 |
|
551 /* Name.Variable.Instance */ |
|
552 pre .vi { color: #008080 } |
|
553 |
|
554 /* Literal.Number.Integer.Long */ |
|
555 pre .il { color: #009999 } |
|
556 |
|
557 """ |
|
558 |
|
559 ########################################################################### |
|
560 ## Styles for dark window schemes below |
|
561 ########################################################################### |
|
562 |
|
563 css_markdown_dark = """ |
|
564 html { |
|
565 background-color: #262626; |
|
566 } |
|
567 |
|
568 body { |
|
569 background-color: #262626); |
|
570 color: #ffffff; |
|
571 font-family: sans-serif; |
|
572 font-size:12px; |
|
573 line-height:1.7; |
|
574 word-wrap:break-word |
|
575 } |
|
576 |
|
577 body>*:first-child { |
|
578 margin-top:0 !important |
|
579 } |
|
580 |
|
581 body>*:last-child { |
|
582 margin-bottom:0 !important |
|
583 } |
|
584 |
|
585 a { |
|
586 color:#8ebfff |
|
587 } |
|
588 |
|
589 a.absent { |
|
590 color:#dd0000 |
|
591 } |
|
592 |
|
593 a.anchor { |
|
594 display:block; |
|
595 padding-right:6px; |
|
596 padding-left:30px; |
|
597 margin-left:-30px; |
|
598 cursor:pointer; |
|
599 position:absolute; |
|
600 top:0; |
|
601 left:0; |
|
602 bottom:0 |
|
603 } |
|
604 |
|
605 a.anchor:focus { |
|
606 outline:none |
|
607 } |
|
608 |
|
609 tt, code, pre { |
|
610 font-family: Consolas, "Liberation Mono", Courier, monospace; |
|
611 font-size: 12px; |
|
612 } |
|
613 |
|
614 h1, h2, h3, h4, h5, h6 { |
|
615 margin:1em 0 6px; |
|
616 padding:0; |
|
617 font-weight:bold; |
|
618 line-height:1.7; |
|
619 cursor:text; |
|
620 position:relative |
|
621 } |
|
622 |
|
623 h1 .octicon-link, h2 .octicon-link, h3 .octicon-link, h4 .octicon-link, |
|
624 h5 .octicon-link, h6 .octicon-link { |
|
625 display:none; |
|
626 color: #ffffff; |
|
627 } |
|
628 |
|
629 h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, |
|
630 h5:hover a.anchor, h6:hover a.anchor { |
|
631 text-decoration:none; |
|
632 line-height:1; |
|
633 padding-left:8px; |
|
634 margin-left:-30px; |
|
635 top:15% |
|
636 } |
|
637 |
|
638 h1:hover a.anchor .octicon-link, h2:hover a.anchor .octicon-link, |
|
639 h3:hover a.anchor .octicon-link, h4:hover a.anchor .octicon-link, |
|
640 h5:hover a.anchor .octicon-link, h6:hover a.anchor .octicon-link { |
|
641 display:inline-block |
|
642 } |
|
643 |
|
644 h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, |
|
645 h5 tt, h5 code, h6 tt, h6 code { |
|
646 font-size:inherit |
|
647 } |
|
648 |
|
649 h1 { |
|
650 font-size:2em; |
|
651 border-bottom:1px solid #ddd |
|
652 } |
|
653 |
|
654 h2 { |
|
655 font-size:1.6em; |
|
656 border-bottom:1px solid #eee |
|
657 } |
|
658 |
|
659 h3 { |
|
660 font-size:1.4em |
|
661 } |
|
662 |
|
663 h4 { |
|
664 font-size:1.2em |
|
665 } |
|
666 |
|
667 h5 { |
|
668 font-size:1em |
|
669 } |
|
670 |
|
671 h6 { |
|
672 color:#aaaaaa; |
|
673 font-size:1em |
|
674 } |
|
675 |
|
676 p, blockquote, ul, ol, dl, table, pre { |
|
677 margin:8px 0 |
|
678 } |
|
679 |
|
680 hr { |
|
681 background: rgba(120, 120, 120, 1); |
|
682 border: 0 none; |
|
683 color: #ccc; |
|
684 height: 2px; |
|
685 padding: 0; |
|
686 margin: 8px 0; |
|
687 } |
|
688 |
|
689 ul, ol { |
|
690 padding-left:15px |
|
691 } |
|
692 |
|
693 ul.no-list, ul.task-list, ol.no-list, ol.task-list { |
|
694 list-style-type:none; |
|
695 } |
|
696 |
|
697 ul ul, ul ol, ol ol, ol ul { |
|
698 margin-top:0; |
|
699 margin-bottom:0 |
|
700 } |
|
701 |
|
702 |
|
703 dl { |
|
704 padding:0 |
|
705 } |
|
706 |
|
707 dl dt { |
|
708 font-size:14px; |
|
709 font-weight:bold; |
|
710 font-style:italic; |
|
711 padding:0; |
|
712 margin-top:8px |
|
713 } |
|
714 |
|
715 dl dd { |
|
716 margin-bottom:15px; |
|
717 padding:0 8px |
|
718 } |
|
719 |
|
720 blockquote { |
|
721 border-left:4px solid #DDD; |
|
722 padding:0 8px; |
|
723 color:#aaaaaa |
|
724 } |
|
725 |
|
726 blockquote>:first-child { |
|
727 margin-top:0px |
|
728 } |
|
729 |
|
730 blockquote>:last-child { |
|
731 margin-bottom:0px |
|
732 } |
|
733 |
|
734 table { |
|
735 border-collapse: collapse; |
|
736 border-spacing: 0; |
|
737 overflow:auto; |
|
738 display:block |
|
739 } |
|
740 |
|
741 table th { |
|
742 font-weight:bold |
|
743 } |
|
744 |
|
745 table th, table td { |
|
746 border:1px solid #ddd; |
|
747 padding:3px 3px |
|
748 } |
|
749 |
|
750 table tr { |
|
751 border-top:1px solid #cccccc; |
|
752 background-color: #262626; |
|
753 } |
|
754 |
|
755 table tr:nth-child(2n) { |
|
756 background-color:#404040; |
|
757 } |
|
758 |
|
759 img { |
|
760 max-width:100%; |
|
761 -moz-box-sizing:border-box; |
|
762 box-sizing:border-box |
|
763 } |
|
764 |
|
765 span.frame { |
|
766 display:block; |
|
767 overflow:hidden |
|
768 } |
|
769 |
|
770 span.frame>span { |
|
771 border:1px solid #464646; |
|
772 display:block; |
|
773 float:left; |
|
774 overflow:hidden; |
|
775 margin:6px 0 0; |
|
776 padding:7px; |
|
777 width:auto |
|
778 } |
|
779 |
|
780 span.frame span img { |
|
781 display:block; |
|
782 float:left |
|
783 } |
|
784 |
|
785 span.frame span span { |
|
786 clear:both; |
|
787 color:#565656; |
|
788 display:block; |
|
789 padding:5px 0 0 |
|
790 } |
|
791 |
|
792 span.align-center { |
|
793 display:block; |
|
794 overflow:hidden; |
|
795 clear:both |
|
796 } |
|
797 |
|
798 span.align-center>span { |
|
799 display:block; |
|
800 overflow:hidden; |
|
801 margin:6px auto 0; |
|
802 text-align:center |
|
803 } |
|
804 |
|
805 span.align-center span img { |
|
806 margin:0 auto; |
|
807 text-align:center |
|
808 } |
|
809 |
|
810 span.align-right { |
|
811 display:block; |
|
812 overflow:hidden; |
|
813 clear:both |
|
814 } |
|
815 |
|
816 span.align-right>span { |
|
817 display:block; |
|
818 overflow:hidden; |
|
819 margin:6px 0 0; |
|
820 text-align:right |
|
821 } |
|
822 |
|
823 span.align-right span img { |
|
824 margin:0; |
|
825 text-align:right |
|
826 } |
|
827 |
|
828 span.float-left { |
|
829 display:block; |
|
830 margin-right:6px; |
|
831 overflow:hidden; |
|
832 float:left |
|
833 } |
|
834 |
|
835 span.float-left span { |
|
836 margin:6px 0 0 |
|
837 } |
|
838 |
|
839 span.float-right { |
|
840 display:block; |
|
841 margin-left:6px; |
|
842 overflow:hidden; |
|
843 float:right |
|
844 } |
|
845 |
|
846 span.float-right>span { |
|
847 display:block; |
|
848 overflow:hidden; |
|
849 margin:6px auto 0; |
|
850 text-align:right |
|
851 } |
|
852 |
|
853 code, tt { |
|
854 margin:0; |
|
855 border:1px solid #ddd; |
|
856 background-color:#404040; |
|
857 border-radius:3px; |
|
858 max-width:100%; |
|
859 display:inline-block; |
|
860 overflow:auto; |
|
861 vertical-align:middle; |
|
862 line-height:1.1; |
|
863 padding:0 |
|
864 } |
|
865 |
|
866 code:before, code:after, tt:before, tt:after { |
|
867 content:"\00a0" |
|
868 } |
|
869 |
|
870 code { |
|
871 white-space:nowrap |
|
872 } |
|
873 |
|
874 pre>code { |
|
875 margin:0; |
|
876 padding:0; |
|
877 white-space:pre; |
|
878 border:none; |
|
879 background:transparent |
|
880 } |
|
881 |
|
882 .highlight pre, pre { |
|
883 background-color:#404040; |
|
884 border:1px solid #ddd; |
|
885 font-size:12px; |
|
886 line-height:16px; |
|
887 overflow:auto; |
|
888 padding:6px 6px; |
|
889 border-radius:3px |
|
890 } |
|
891 |
|
892 pre { |
|
893 word-wrap:normal |
|
894 } |
|
895 |
|
896 pre code, pre tt { |
|
897 margin:0; |
|
898 padding:0; |
|
899 background-color:transparent; |
|
900 border:none; |
|
901 word-wrap:normal; |
|
902 max-width:initial; |
|
903 display:inline; |
|
904 overflow:initial; |
|
905 line-height:inherit |
|
906 } |
|
907 |
|
908 pre code:before, pre code:after, pre tt:before, pre tt:after { |
|
909 content:normal |
|
910 } |
|
911 |
|
912 kbd { |
|
913 border:1px solid gray; |
|
914 font-size:1.2em; |
|
915 box-shadow:1px 0 1px 0 #eee, 0 1px 0 1px #ccc, 0 2px 0 2px #444; |
|
916 -webkit-border-radius:2px; |
|
917 -moz-border-radius:2px; |
|
918 border-radius:2px; |
|
919 margin:2px 3px; |
|
920 padding:1px 5px; |
|
921 color: #000; |
|
922 background-color: #fff |
|
923 } |
|
924 """ |
|
925 |
|
926 |
|
927 css_pygments_dark = """ |
|
928 pre .hll { background-color: #464646 } |
|
929 |
|
930 /* Comment */ |
|
931 pre .c { color: #74cc66; font-style: italic } |
|
932 |
|
933 /* Error */ |
|
934 pre .err { color: #a61717; background-color: #e3d2d2 } |
|
935 |
|
936 /* Keyword */ |
|
937 pre .k { font-weight: bold } |
|
938 |
|
939 /* Operator */ |
|
940 pre .o { font-weight: bold } |
|
941 |
|
942 /* Comment.Multiline */ |
|
943 pre .cm { color: #74cc66; font-style: italic } |
|
944 |
|
945 /* Comment.Preproc */ |
|
946 pre .cp { color: #74cc66; font-weight: bold; font-style: italic } |
|
947 |
|
948 /* Comment.Single */ |
|
949 pre .c1 { color: #74cc66; font-style: italic } |
|
950 |
|
951 /* Comment.Special */ |
|
952 pre .cs { color: #74cc66; font-weight: bold; font-style: italic } |
|
953 |
|
954 /* Generic.Deleted */ |
|
955 pre .gd { color: #ffffff; background-color: #843d3d } |
|
956 |
|
957 /* Generic.Emph */ |
|
958 pre .ge { font-style: italic } |
|
959 |
|
960 /* Generic.Error */ |
|
961 pre .gr { color: #ff0000 } |
|
962 |
|
963 /* Generic.Heading */ |
|
964 pre .gh { color: #dadada } |
|
965 |
|
966 /* Generic.Inserted */ |
|
967 pre .gi { color: #ffffff; background-color: #4e8750 } |
|
968 |
|
969 /* Generic.Output */ |
|
970 pre .go { color: #bbbbbb } |
|
971 |
|
972 /* Generic.Prompt */ |
|
973 pre .gp { color: #999999 } |
|
974 |
|
975 /* Generic.Strong */ |
|
976 pre .gs { font-weight: bold } |
|
977 |
|
978 /* Generic.Subheading */ |
|
979 pre .gu { color: #dd60dd } |
|
980 |
|
981 /* Generic.Traceback */ |
|
982 pre .gt { color: #ff0000 } |
|
983 |
|
984 /* Keyword.Constant */ |
|
985 pre .kc { font-weight: bold } |
|
986 |
|
987 /* Keyword.Declaration */ |
|
988 pre .kd { font-weight: bold } |
|
989 |
|
990 /* Keyword.Namespace */ |
|
991 pre .kn { font-weight: bold } |
|
992 |
|
993 /* Keyword.Pseudo */ |
|
994 pre .kp { font-weight: bold } |
|
995 |
|
996 /* Keyword.Reserved */ |
|
997 pre .kr { font-weight: bold } |
|
998 |
|
999 /* Keyword.Type */ |
|
1000 pre .kt { color: #b3efad; font-weight: bold } |
|
1001 |
|
1002 /* Literal.Number */ |
|
1003 pre .m { color: #00c8c8 } |
|
1004 |
|
1005 /* Literal.String */ |
|
1006 pre .s { color: #f46b6b } |
|
1007 |
|
1008 /* Name.Attribute */ |
|
1009 pre .na { color: #b6d13b } |
|
1010 |
|
1011 /* Name.Builtin */ |
|
1012 pre .nb { color: #b3efad } |
|
1013 |
|
1014 /* Name.Class */ |
|
1015 pre .nc { color: #00aaff; font-weight: bold } |
|
1016 |
|
1017 /* Name.Constant */ |
|
1018 pre .no { color: #dd3131 } |
|
1019 |
|
1020 /* Name.Decorator */ |
|
1021 pre .nd { color: #e19bff; font-weight: bold } |
|
1022 |
|
1023 /* Name.Entity */ |
|
1024 pre .ni { color: #dedede } |
|
1025 |
|
1026 /* Name.Exception */ |
|
1027 pre .ne { color: #e75555; font-weight: bold } |
|
1028 |
|
1029 /* Name.Function */ |
|
1030 pre .nf { color: #00aaff; font-weight: bold } |
|
1031 |
|
1032 /* Name.Label */ |
|
1033 pre .nl { color: #e1e100; font-weight: bold } |
|
1034 |
|
1035 /* Name.Namespace */ |
|
1036 pre .nn { color: #00aaff } |
|
1037 |
|
1038 /* Name.Tag */ |
|
1039 pre .nt { color: #b3efad } |
|
1040 |
|
1041 /* Name.Variable */ |
|
1042 pre .nv { color: #00aaff } |
|
1043 |
|
1044 /* Operator.Word */ |
|
1045 pre .ow { font-weight: bold } |
|
1046 |
|
1047 /* Text.Whitespace */ |
|
1048 pre .w { color: #bbbbbb } |
|
1049 |
|
1050 /* Literal.Number.Float */ |
|
1051 pre .mf { color: #00aaff } |
|
1052 |
|
1053 /* Literal.Number.Hex */ |
|
1054 pre .mh { color: #00aaff } |
|
1055 |
|
1056 /* Literal.Number.Integer */ |
|
1057 pre .mi { color: #00aaff } |
|
1058 |
|
1059 /* Literal.Number.Oct */ |
|
1060 pre .mo { color: #00aaff } |
|
1061 |
|
1062 /* Literal.String.Backtick */ |
|
1063 pre .sb { color: #f46b6b } |
|
1064 |
|
1065 /* Literal.String.Char */ |
|
1066 pre .sc { color: #f46b6b } |
|
1067 |
|
1068 /* Literal.String.Doc */ |
|
1069 pre .sd { color: #f46b6b } |
|
1070 |
|
1071 /* Literal.String.Double */ |
|
1072 pre .s2 { color: #f46b6b } |
|
1073 |
|
1074 /* Literal.String.Escape */ |
|
1075 pre .se { color: #f46b6b } |
|
1076 |
|
1077 /* Literal.String.Heredoc */ |
|
1078 pre .sh { color: #f46b6b } |
|
1079 |
|
1080 /* Literal.String.Interpol */ |
|
1081 pre .si { color: #f46b6b } |
|
1082 |
|
1083 /* Literal.String.Other */ |
|
1084 pre .sx { color: #f46b6b } |
|
1085 |
|
1086 /* Literal.String.Regex */ |
|
1087 pre .sr { color: #bb6688 } |
|
1088 |
|
1089 /* Literal.String.Single */ |
|
1090 pre .s1 { color: #f46b6b } |
|
1091 |
|
1092 /* Literal.String.Symbol */ |
|
1093 pre .ss { color: #00aaff } |
|
1094 |
|
1095 /* Name.Builtin.Pseudo */ |
|
1096 pre .bp { color: #b3efad } |
|
1097 |
|
1098 /* Name.Variable.Class */ |
|
1099 pre .vc { color: #00aaff } |
|
1100 |
|
1101 /* Name.Variable.Global */ |
|
1102 pre .vg { color: #00aaff } |
|
1103 |
|
1104 /* Name.Variable.Instance */ |
|
1105 pre .vi { color: #00aaff } |
|
1106 |
|
1107 /* Literal.Number.Integer.Long */ |
|
1108 pre .il { color: #00c8c8 } |
|
1109 |
|
1110 """ |