gitweb: Use light/dark for class names also in 'blame' view
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>
Jakub Narebski committed
Jul 25, 2009 at 00:44 UTC
aef37684ea713c96dc3e4913cf33962df1efb92b
2 files changed
+11
-8
gitweb/gitweb.css
+10
-7
@@ -226,22 +226,25 @@ th {
226
text-align: left;
227
}
228
229
-tr.light:hover {
230
- background-color: #edece6;
231
-}
232
-
233
-tr.dark {
234
- background-color: #f6f6f0;
229
+/* do not change row style on hover for 'blame' view */
230
+tr.light,
231
+table.blame .light:hover {
232
+ background-color: #ffffff;
233
}
234
237
-tr.dark2 {
235
+tr.dark,
236
+table.blame .dark:hover {
237
background-color: #f6f6f0;
238
}
239
240
+/* currently both use the same, but it can change */
241
+tr.light:hover,
242
tr.dark:hover {
243
background-color: #edece6;
244
}
245
246
+/* boundary commits in 'blame' view */
247
+/* and commits without "previous" */
248
tr.boundary td.sha1,
249
tr.no-previous td.linenr {
250
font-weight: bold;
gitweb/gitweb.perl
+1
-1
@@ -4801,7 +4801,7 @@ sub git_blame {
4801
git_print_page_path($file_name, $ftype, $hash_base);
4802
4803
# page body
4804
- my @rev_color = qw(light2 dark2);
4804
+ my @rev_color = qw(light dark);
4805
my $num_colors = scalar(@rev_color);
4806
my $current_color = 0;
4807
my %metainfo = ();