|
| 1 | +@import "compass/css3"; |
| 2 | + |
| 3 | +.diff { |
| 4 | + $bgcolor: #fff; |
| 5 | + $bgcolor-edit-highlight: #88e; |
| 6 | + $bgcolor-insert-highlight: #8e8; |
| 7 | + $bgcolor-delete-highlight: #e88; |
| 8 | + |
| 9 | + $bgcolor-edit: tint($bgcolor-edit-highlight, 75%); |
| 10 | + $bgcolor-insert: tint($bgcolor-insert-highlight, 75%); |
| 11 | + $bgcolor-delete: tint($bgcolor-delete-highlight, 75%); |
| 12 | + |
| 13 | + $table-head-color: #aaa; |
| 14 | + $table-sidebar-color: #ccc; |
| 15 | + $border-color: #000; |
| 16 | + |
| 17 | + border-collapse: collapse; |
| 18 | + border-spacing: 0; |
| 19 | + border: 1px solid $border-color; |
| 20 | + color: #000; |
| 21 | + empty-cells: show; |
| 22 | + font-family: consolas, pmingliu, simhei; |
| 23 | + font-size: 13px; |
| 24 | + width: 100%; |
| 25 | + word-break: break-all; |
| 26 | + |
| 27 | + th { |
| 28 | + font-weight: 700; |
| 29 | + } |
| 30 | + |
| 31 | + td, |
| 32 | + th { |
| 33 | + border-collapse: separate; |
| 34 | + border: none; |
| 35 | + padding: 1px 2px; |
| 36 | + background: $bgcolor; |
| 37 | + |
| 38 | + a { |
| 39 | + color: #000; |
| 40 | + cursor: inherit; |
| 41 | + pointer-events: none; |
| 42 | + } |
| 43 | + } |
| 44 | + |
| 45 | + thead th { |
| 46 | + background: $table-head-color; |
| 47 | + border-bottom: 1px solid $border-color; |
| 48 | + padding: 4px; |
| 49 | + text-align: left; |
| 50 | + } |
| 51 | + |
| 52 | + tbody { |
| 53 | + &.skipped { |
| 54 | + border-top: 1px solid #000; |
| 55 | + |
| 56 | + td, |
| 57 | + th { |
| 58 | + display: none; |
| 59 | + } |
| 60 | + } |
| 61 | + |
| 62 | + th { |
| 63 | + background: $table-sidebar-color; |
| 64 | + border-right: 1px solid $border-color; |
| 65 | + text-align: right; |
| 66 | + vertical-align: top; |
| 67 | + width: 4em; |
| 68 | + |
| 69 | + &.sign { |
| 70 | + background: $bgcolor; |
| 71 | + border-right: none; |
| 72 | + padding: 1px 0; |
| 73 | + text-align: center; |
| 74 | + width: 1em; |
| 75 | + |
| 76 | + &.del { |
| 77 | + background: $bgcolor-delete; |
| 78 | + } |
| 79 | + |
| 80 | + &.ins { |
| 81 | + background: $bgcolor-insert; |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + &.diff-html { |
| 88 | + white-space: pre-wrap; |
| 89 | + |
| 90 | + .change { |
| 91 | + &.change-eq { |
| 92 | + .old, |
| 93 | + .new { |
| 94 | + background: $bgcolor; |
| 95 | + } |
| 96 | + } |
| 97 | + |
| 98 | + .old { |
| 99 | + background: $bgcolor-delete; |
| 100 | + } |
| 101 | + |
| 102 | + .new { |
| 103 | + background: $bgcolor-insert; |
| 104 | + } |
| 105 | + |
| 106 | + ins, |
| 107 | + del { |
| 108 | + font-weight: 700; |
| 109 | + text-decoration: none; |
| 110 | + } |
| 111 | + |
| 112 | + ins { |
| 113 | + background: $bgcolor-insert-highlight; |
| 114 | + } |
| 115 | + |
| 116 | + del { |
| 117 | + background: $bgcolor-delete-highlight; |
| 118 | + } |
| 119 | + } |
| 120 | + |
| 121 | + .edit-container { |
| 122 | + &:hover { |
| 123 | + box-shadow: 0 0 8px 2px #888; |
| 124 | + position: relative; |
| 125 | + z-index: 5; |
| 126 | + } |
| 127 | + |
| 128 | + &.edited { |
| 129 | + background: $bgcolor-edit; |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + .edit { |
| 134 | + display: block; |
| 135 | + outline: none; |
| 136 | + } |
| 137 | + } |
| 138 | +} |
0 commit comments