Skip to content

Commit

Permalink
gitweb: Use light/dark for class names also in 'blame' view
Browse files Browse the repository at this point in the history
Instead of using "light2" and "dark2" for class names in 'blame' view
(in place of "light" and "dark" classes in other places) to avoid
changing style on hover in 'blame' view while doing it for other views
(like 'shortlog'), use more advanced CSS, relying on the fact that
more specific selector wins.

While at it add a few comments to gitweb CSS file, and consolidate
some repeated info.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Jul 25, 2009
1 parent a36817b commit aef3768
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions gitweb/gitweb.css
Original file line number Diff line number Diff line change
Expand Up @@ -226,22 +226,25 @@ th {
text-align: left;
}

tr.light:hover {
background-color: #edece6;
}

tr.dark {
background-color: #f6f6f0;
/* do not change row style on hover for 'blame' view */
tr.light,
table.blame .light:hover {
background-color: #ffffff;
}

tr.dark2 {
tr.dark,
table.blame .dark:hover {
background-color: #f6f6f0;
}

/* currently both use the same, but it can change */
tr.light:hover,
tr.dark:hover {
background-color: #edece6;
}

/* boundary commits in 'blame' view */
/* and commits without "previous" */
tr.boundary td.sha1,
tr.no-previous td.linenr {
font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,7 @@ sub git_blame {
git_print_page_path($file_name, $ftype, $hash_base);

# page body
my @rev_color = qw(light2 dark2);
my @rev_color = qw(light dark);
my $num_colors = scalar(@rev_color);
my $current_color = 0;
my %metainfo = ();
Expand Down

0 comments on commit aef3768

Please sign in to comment.