Style diff a little bit better

This commit is contained in:
Magnus Hoff 2017-11-06 12:55:13 +01:00
parent 4ae2637192
commit 2042e5e7fe
2 changed files with 12 additions and 9 deletions

View file

@ -418,14 +418,17 @@ input[type="search"] {
}
}
.removed {
background: red;
.diff {
background: none;
white-space: pre-wrap;
}
.same {
background: white;
.removed {
color: #866;
background: #fdd;
text-decoration: line-through;
}
.added {
background: green;
background: #ceb;
}
@media print {

View file

@ -4,10 +4,10 @@
</header>
<article>
<pre>{{#lines}}{{#.removed}}<div class="removed">{{.}}
</div>{{/.removed}}{{#.same}}<div class="same">{{.}}
</div>{{/.same}}{{#.added}}<div class="added">{{.}}
</div>{{/.added}}{{/lines}}</pre>
<pre class="diff">{{#lines}}{{#.removed}}<span class="removed">{{.}}
</span>{{/.removed}}{{#.same}}<span class="same">{{.}}
</span>{{/.same}}{{#.added}}<span class="added">{{.}}
</span>{{/.added}}{{/lines}}</pre>
</article>
</div>