-
Notifications
You must be signed in to change notification settings - Fork 9
/
codediff.css
156 lines (140 loc) · 3.15 KB
/
codediff.css
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
.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;
}
.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;
}