On Mon, 25 Apr 2011, Georg-Johann Lay wrote:
> In viewvc's colored diff views, there is no CSS class defined for 
> changed lines
> 
> One example:
> 
> http://gcc.gnu.org/viewcvs/trunk/gcc/config/avr/libgcc.S?r1=172384&r2=172383&pathrev=172384&diff_format=h
> 
> The "removed" lines have a red background and can be seen easily.
> But the "changed" lines have just a slight variation in font face and it's
> hard to find all changed lines.
> 
> The "changed" lines refer to a CSS class "vc_diff_change" which is 
> defined nowhere: http://gcc.gnu.org/viewvc-static/styles.css doesn't 
> define that class.
> 
> Moreover, the red lines use a fixed-size font whereas other source lines use a
> variable-width font which make it hard to distinguish O/0 resp. I/l/1/|.
> 
> IMO a fixed-width, same-face font for all source lines is preferable, 
> and the changed lines could be better seen if they had a distinct 
> background color like, say, yellow.

Interesting.  I addressed this by patching /var/www/viewvc/styles.css
as follows, though I am really wondering why this was (obviously) broken
to begin with. 

overseers, do you have any idea?

Gerald

--- styles.css.orig     2010-03-31 20:59:31.000000000 +0000
+++ styles.css  2011-04-25 12:24:15.000000000 +0000
@@ -282,17 +282,22 @@
 
 /*** Diff Styles ***/
 .vc_diff_plusminus { width: 1em; }
-.vc_diff_remove, .vc_diff_add, .vc_diff_changes1, .vc_diff_changes2 { 
+.vc_diff_remove, .vc_diff_add, .vc_diff_changes1, .vc_diff_changes2,
+.vc_diff_change { 
   font-family: monospace; 
+  font-size: smaller;
   white-space: pre; 
 }
 .vc_diff_remove { background: rgb(100%,60%,60%); }
 .vc_diff_add { background: rgb(60%,100%,60%); }
 .vc_diff_changes1 { background: rgb(100%,100%,70%); color: rgb(50%,50%,50%); 
text-decoration: line-through; }
 .vc_diff_changes2 { background: rgb(100%,100%,0%); }
+.vc_diff_change   { background: rgb(100%,100%,0%); }
+
 .vc_diff_nochange, .vc_diff_binary, .vc_diff_error {
-  font-family: sans-serif;
+  font-family: monospace;
   font-size: smaller;
+  white-space: pre; 
 }
 
 /*** Intraline Diff Styles ***/

Reply via email to