Another tweak for wide diffs: there *is* a CSS 3 draft property (word-wrap: break...
[lhc/web/wiklou.git] / skins / common / diff.css
1 /*
2 ** Diff rendering
3 */
4 table.diff, td.diff-otitle, td.diff-ntitle {
5 background-color: white;
6 }
7 td.diff-otitle,
8 td.diff-ntitle {
9 text-align: center;
10 }
11 td.diff-marker {
12 text-align: right;
13 }
14 td.diff-addedline {
15 background: #cfc;
16 font-size: smaller;
17 }
18 td.diff-deletedline {
19 background: #ffa;
20 font-size: smaller;
21 }
22 td.diff-context {
23 background: #eee;
24 font-size: smaller;
25 }
26 .diffchange {
27 color: red;
28 font-weight: bold;
29 text-decoration: none;
30 }
31
32 table.diff {
33 border: none;
34 width: 98%;
35 border-spacing: 4px;
36
37 /* Fixed layout is required to ensure that cells containing long URLs
38 don't widen in Safari, Internet Explorer, or iCab */
39 table-layout: fixed;
40 }
41 table.diff td {
42 padding: 0;
43 }
44 table.diff col.diff-marker {
45 width: 2%;
46 }
47 table.diff col.diff-content {
48 width: 48%;
49 }
50 table.diff td div {
51 /* Force-wrap very long lines such as URLs or page-widening char strings.
52 CSS 3 draft..., but Gecko doesn't support it yet:
53 https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */
54 word-wrap: break-word;
55
56 /* As fallback, scrollbars will be added for very wide cells
57 instead of text overflowing or widening */
58 overflow: auto;
59 }