diff.css 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. .rtl td.diff-marker {
  15. text-align: left;
  16. }
  17. td.diff-lineno {
  18. font-weight: bold;
  19. }
  20. td.diff-addedline {
  21. background: #cfc;
  22. font-size: smaller;
  23. }
  24. td.diff-deletedline {
  25. background: #ffa;
  26. font-size: smaller;
  27. }
  28. td.diff-context {
  29. background: #eee;
  30. font-size: smaller;
  31. }
  32. .diffchange {
  33. color: red;
  34. font-weight: bold;
  35. text-decoration: none;
  36. white-space: pre-wrap;
  37. white-space: -moz-pre-wrap;
  38. }
  39. table.diff {
  40. border: none;
  41. width: 98%;
  42. border-spacing: 4px;
  43. /* Fixed layout is required to ensure that cells containing long URLs
  44. don't widen in Safari, Internet Explorer, or iCab */
  45. table-layout: fixed;
  46. }
  47. table.diff td {
  48. padding: 0;
  49. }
  50. table.diff col.diff-marker {
  51. width: 2%;
  52. }
  53. table.diff col.diff-content {
  54. width: 48%;
  55. }
  56. table.diff td div {
  57. /* Force-wrap very long lines such as URLs or page-widening char strings.
  58. CSS 3 draft..., but Gecko doesn't support it yet:
  59. https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */
  60. word-wrap: break-word;
  61. /* As fallback, scrollbars will be added for very wide cells
  62. instead of text overflowing or widening */
  63. overflow: auto;
  64. /* The above rule breaks on very old versions of Mozilla due
  65. to a bug which collapses the table cells to a single line.
  66. In Mozilla 1.1 and below with JavaScript enabled, the rule
  67. will be overridden with this by diff.js; wide cell contents
  68. then spill horizontally without widening the rest of the
  69. table: */
  70. /* overflow: visible; */
  71. }
  72. /*
  73. * Styles for the HTML Diff
  74. */
  75. div.diff-switchtype{
  76. text-align: center;
  77. font-weight: bold;
  78. font-size: smaller;
  79. }
  80. span.diff-html-added {
  81. font-size: 100%;
  82. background-color: #20ff20
  83. }
  84. span.diff-html-removed {
  85. font-size: 100%;
  86. text-decoration: line-through;
  87. background-color: #ff2020
  88. }
  89. span.diff-html-changed {
  90. background: url(images/diffunderline.gif) bottom repeat-x;
  91. /* Hack for IE5.5, see http://lists.wikimedia.org/pipermail/wikitech-l/2008-November/040273.html */
  92. *background-color: #c6c6fd; /* light blue */
  93. }
  94. span.diff-html-added img{
  95. border: 5px solid #ccffcc;
  96. }
  97. span.diff-html-removed img{
  98. border: 5px solid #fdc6c6;
  99. }
  100. span.diff-html-changed img{
  101. border: 5px dotted #000099;
  102. }
  103. span.diff-html-changed {
  104. position: relative; /* this is key */
  105. cursor: help;
  106. }
  107. span.diff-html-changed span.tip {
  108. display: none; /* so is this */
  109. }
  110. /* tooltip will display on :hover event */
  111. span.diff-html-changed:hover span.tip {
  112. display: block;
  113. z-index: 95;
  114. position: absolute;
  115. top: 2.5em;
  116. left: 0;
  117. width: auto;
  118. line-height: 1.2em;
  119. padding: 3px 7px 4px 6px;
  120. border: 1px solid #336;
  121. background-color: #f7f7ee;
  122. font-size: 10px;
  123. text-align: left;
  124. }