[DOC-WEB] [web-doc] master: Add background colors to changed lines

1 view
Skip to first unread message

Nilgün Belma Bugüner

unread,
Dec 28, 2021, 8:03:52 AM12/28/21
to doc...@lists.php.net
Author: Nilgün Belma Bugüner (nilgun)
Date: 2021-12-28T16:03:41+03:00

Commit: https://github.com/php/web-doc/commit/6551900f22656e05c55e5c87d15820cf342ced7c
Raw diff: https://github.com/php/web-doc/commit/6551900f22656e05c55e5c87d15820cf342ced7c.diff

Add background colors to changed lines
Closes #27

Changed paths:
M include/lib_revcheck.inc.php


Diff:

diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php
index 3e31c2c..7491f1e 100644
--- a/include/lib_revcheck.inc.php
+++ b/include/lib_revcheck.inc.php
@@ -260,13 +260,13 @@ function showdiff ()
$inline = strtr( $line , $trans );
$fc = substr( $inline , 0 , 1 );
if ( $fc == "+" ) {
- echo "<div style='color:green;font-family:mono'>";
+ echo "<div style='color:darkgreen;background-color:#e6ffec;font-family:mono;overflow-wrap:break-word;'>";
} elseif ( $fc == "-" ) {
- echo "<div style='color:red;font-family:mono'>";
+ echo "<div style='color:firebrick;background-color:#ffebe9;font-family:mono;overflow-wrap:break-word;'>";
} elseif ( $fc == "@" ) {
- echo "<div style='color:blue;font-family:mono'>";
+ echo "<div style='color:darkblue;background-color:#ddf4ff;font-family:mono;overflow-wrap:break-word;'>";
} else
- echo "<div style='color:gray;font-family:mono'>";
+ echo "<div style='color:gray;line-height:1.2;font-family:mono'>";
echo "$inline</div>\n";
}
echo "<p></p>";

--
Documentation Website Mailing List (http://doc.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply all
Reply to author
Forward
0 new messages