-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathcodediff.css
More file actions
212 lines (192 loc) · 4.23 KB
/
Copy pathcodediff.css
File metadata and controls
212 lines (192 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
.diff {
box-sizing: border-box;
}
div.diff {
max-width: 100%;
display: table;
}
table.diff {
width: 100%;
border-spacing: 0;
}
td.code {
/* this is the max width of each column of code. */
/* for table cells, `width` behaves more like `max-width`. */
width: 61ch;
white-space: pre-wrap;
word-wrap: break-word;
}
table.diff td.code {
word-break: break-all;
}
table.diff.word-wrap td.code {
word-break: normal;
}
table.diff td {
vertical-align: top;
}
/* Line numbers with thin vertical bars to indicate wrapped lines. */
.line-no {
color: #999;
background-color: #f7f7f7;
}
.line-no:first-child {
background-image:
linear-gradient(to left, #f7f7f7, #f7f7f7 3px, transparent, transparent 6px, #f7f7f7 6px),
linear-gradient(#f7f7f7, #f7f7f7 1.5em, #aaa 1.5em);
}
.line-no:last-child {
background-image:
linear-gradient(to right, #f7f7f7, #f7f7f7 3px, transparent, transparent 6px, #f7f7f7 6px),
linear-gradient(#f7f7f7, #f7f7f7 1.5em, #aaa 1.5em);
}
table.diff .line-no:first-child {
border-right: 1px solid #ddd;
text-align: right;
}
table.diff .line-no:last-child {
border-left: 1px solid #ddd;
text-align: left;
}
table.diff td:nth-child(2) {
border-right: 1px solid #ddd;
}
table.diff tr.skip-row td {
border-left: none;
border-right: none;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
padding: 0.5em;
}
/* Partially collapse empty sides of diffs */
.diff.diff-add td.before,
.diff.diff-delete td.after {
width: 51ch;
}
.line-no, .code {
padding: 2px;
height: 1.11em;
font-family: monospace;
}
.diff .skip {
text-align: center;
background: white;
color: #999;
}
.arrows-left {
float: left;
}
.arrows-right {
float: right;
}
.expand-up + .expand-down {
margin-left: 0.25em;
}
.hunk-header {
margin-left: 2em;
color: #777;
}
span.skip {
cursor: pointer;
}
.diff .delete, .before.replace {
background-color: #fee;
}
.diff .insert, .after.replace {
background-color: #efe;
}
.before .char-replace, .before .char-delete {
background-color: #fcc;
}
.after .char-replace, .after .char-insert {
background-color: #cfc;
}
/* Single column selection */
.selecting-left td,
.selecting-left td *,
.selecting-right td,
.selecting-right td *
{
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.selecting-left td.line-no::selection,
.selecting-left td.line-no *::selection,
.selecting-right td.line-no::selection,
.selecting-right td.line-no *::selection,
.selecting-left td.after::selection,
.selecting-left td.after *::selection,
.selecting-right td.before::selection,
.selecting-right td.before *::selection
{
background: transparent;
}
.selecting-left td.line-no::-moz-selection,
.selecting-left td.line-no *::-moz-selection,
.selecting-right td.line-no::-moz-selection,
.selecting-right td.line-no *::-moz-selection,
.selecting-left td.after::-moz-selection,
.selecting-left td.after *::-moz-selection,
.selecting-right td.before::-moz-selection,
.selecting-right td.before *::-moz-selection
{
background: transparent;
}
.selecting-left td.before,
.selecting-left td.before *,
.selecting-right td.after,
.selecting-right td.after * {
-moz-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
a, a:visited {
text-decoration: none;
color: #00a;
}
tr.skip-row {
position: relative;
line-height: 1.5em;
}
.skip.right {
position: absolute;
}
.skip.right {
right: 32px;
}
.skip.expand-up, .skip.expand-down {
font-size: 12px;
font-family: Inconsolata, Consolas, "Liberation Mono", Menlo, Courier, monospace;
color: #aaa;
background: #fff;
border: 1px solid #e8e8e8;
padding: 0px 5px;
cursor: pointer;
white-space: nowrap;
display: inline-block;
line-height: 1.3;
letter-spacing: 0.04em;
}
.skip.expand-up:hover, .skip.expand-down:hover {
background: #f5f5f5;
color: #888;
border-color: #ccc;
}
/* tab hangs down from the row above: no top border, rounded bottom corners */
.skip.expand-up {
top: 0;
border-top: none;
border-radius: 0 0 4px 4px;
}
/* tab sticks up from the row below: no bottom border, rounded top corners */
.skip.expand-down {
bottom: 0;
border-bottom: none;
border-radius: 4px 4px 0 0;
}
a.show-more {
color: #888;
}