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 { .diff {
background: red; background: none;
white-space: pre-wrap;
} }
.same { .removed {
background: white; color: #866;
background: #fdd;
text-decoration: line-through;
} }
.added { .added {
background: green; background: #ceb;
} }
@media print { @media print {

View file

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