|
| 1 | +/* Difference Highlighting and Strike-through |
| 2 | +------------------------------------------------ */ |
| 3 | + |
| 4 | +ins { |
| 5 | + color: #333333; |
| 6 | + background-color: #eaffea; |
| 7 | + text-decoration: none; |
| 8 | +} |
| 9 | + |
| 10 | +del { |
| 11 | + color: #AA3333; |
| 12 | + background-color: #ffeaea; |
| 13 | + text-decoration: line-through; |
| 14 | + &.diffimg.diffsrc { |
| 15 | + display: inline-block; |
| 16 | + position: relative; |
| 17 | + &:before { |
| 18 | + position: absolute; |
| 19 | + content: ""; |
| 20 | + left: 0; |
| 21 | + top: 0; |
| 22 | + width: 100%; |
| 23 | + height: 100%; |
| 24 | + background: repeating-linear-gradient(to left top, rgba(255, 0, 0, 0), rgba(255, 0, 0, 0) 49.5%, rgba(255, 0, 0, 1) 49.5%, rgba(255, 0, 0, 1) 50.5%), repeating-linear-gradient(to left bottom, rgba(255, 0, 0, 0), rgba(255, 0, 0, 0) 49.5%, rgba(255, 0, 0, 1) 49.5%, rgba(255, 0, 0, 1) 50.5%); |
| 25 | + } |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +/* Image Diffing |
| 30 | +------------------------------------------------ */ |
| 31 | + |
| 32 | +/* List Diffing |
| 33 | +------------------------------------------------ */ |
| 34 | +/* List Styles */ |
| 35 | + |
| 36 | +.diff-list { |
| 37 | + list-style: none; |
| 38 | + counter-reset: section; |
| 39 | + display: table; |
| 40 | + > li { |
| 41 | + &.normal, &.removed { |
| 42 | + display: table-row; |
| 43 | + } |
| 44 | + &.replacement { |
| 45 | + display: table-row; |
| 46 | + &:before { |
| 47 | + color: #333333; |
| 48 | + background-color: #eaffea; |
| 49 | + text-decoration: none; |
| 50 | + } |
| 51 | + } |
| 52 | + > div { |
| 53 | + display: inline; |
| 54 | + } |
| 55 | + &.new:before { |
| 56 | + color: #333333; |
| 57 | + background-color: #eaffea; |
| 58 | + text-decoration: none; |
| 59 | + } |
| 60 | + &.removed:before { |
| 61 | + counter-increment: section; |
| 62 | + color: #AA3333; |
| 63 | + background-color: #ffeaea; |
| 64 | + text-decoration: line-through; |
| 65 | + } |
| 66 | + &.normal:before, &.removed:before, &.replacement:before { |
| 67 | + width: 15px; |
| 68 | + overflow: hidden; |
| 69 | + content: counters(section, ".") ". "; |
| 70 | + display: table-cell; |
| 71 | + text-indent: -1em; |
| 72 | + padding-left: 1em; |
| 73 | + } |
| 74 | + &.normal:before { |
| 75 | + counter-increment: section; |
| 76 | + } |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | +/* List Counters / Numbering */ |
| 81 | + |
| 82 | +li.replacement + li.replacement:before, .diff-list > li.replacement:first-child:before { |
| 83 | + counter-increment: section; |
| 84 | +} |
| 85 | + |
| 86 | +ol.diff-list li.removed + li { |
| 87 | + &.replacement { |
| 88 | + counter-increment: none; |
| 89 | + } |
| 90 | + &.removed + li { |
| 91 | + &.replacement { |
| 92 | + counter-increment: section -1; |
| 93 | + } |
| 94 | + &.removed + li { |
| 95 | + &.replacement { |
| 96 | + counter-increment: section -2; |
| 97 | + } |
| 98 | + &.removed + li { |
| 99 | + &.replacement { |
| 100 | + counter-increment: section -3; |
| 101 | + } |
| 102 | + &.removed + li { |
| 103 | + &.replacement { |
| 104 | + counter-increment: section -4; |
| 105 | + } |
| 106 | + &.removed + li { |
| 107 | + &.replacement { |
| 108 | + counter-increment: section -5; |
| 109 | + } |
| 110 | + &.removed + li { |
| 111 | + &.replacement { |
| 112 | + counter-increment: section -6; |
| 113 | + } |
| 114 | + &.removed + li { |
| 115 | + &.replacement { |
| 116 | + counter-increment: section -7; |
| 117 | + } |
| 118 | + &.removed + li { |
| 119 | + &.replacement { |
| 120 | + counter-increment: section -8; |
| 121 | + } |
| 122 | + &.removed + li { |
| 123 | + &.replacement { |
| 124 | + counter-increment: section -9; |
| 125 | + } |
| 126 | + &.removed + li { |
| 127 | + &.replacement { |
| 128 | + counter-increment: section -10; |
| 129 | + } |
| 130 | + &.removed + li.replacement { |
| 131 | + counter-increment: section -11; |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + } |
| 136 | + } |
| 137 | + } |
| 138 | + } |
| 139 | + } |
| 140 | + } |
| 141 | + } |
| 142 | + } |
| 143 | +} |
| 144 | + |
| 145 | +/* Exception Lists */ |
| 146 | + |
| 147 | +ul.exception { |
| 148 | + list-style: none; |
| 149 | + content: none; |
| 150 | + li:before { |
| 151 | + list-style: none; |
| 152 | + content: none; |
| 153 | + } |
| 154 | +} |
| 155 | + |
| 156 | +.diff-list ul.exception ol { |
| 157 | + list-style: none; |
| 158 | + counter-reset: exception-section; |
| 159 | + /* Creates a new instance of the section counter with each ol element */ |
| 160 | + > li:before { |
| 161 | + counter-increment: exception-section; |
| 162 | + content: counters(exception-section, ".") "."; |
| 163 | + } |
| 164 | +} |
0 commit comments