From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 4/3] gitweb: Use light/dark class also in 'blame' view
Date: Mon, 13 Jul 2009 00:08:45 +0200 [thread overview]
Message-ID: <200907130008.46168.jnareb@gmail.com> (raw)
In-Reply-To: <200907102354.43232.jnareb@gmail.com>
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>
---
This is an RFC because
1. I am not sure if I did it correctly. I had to fiddle a bit with CSS
(using "table.blame .light:hover" in place of "table.blame tr.light:hover")
to get the same behaviour (well, the same as far as I have checked it).
2. Commit message could use improvements (single sentence, blergh).
gitweb/gitweb.css | 16 +++++++++-------
gitweb/gitweb.perl | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 5e2f629..4e4f8aa 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -226,22 +226,24 @@ 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 */
tr.boundary td.sha1 {
font-weight: bold;
}
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5336c92..bb7a5a9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4811,7 +4811,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 = ();
--
1.6.3.3
prev parent reply other threads:[~2009-07-12 22:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-10 21:54 [PATCH 0/3] gitweb: 'blame' view improvements Jakub Narebski
2009-07-10 21:55 ` [PATCH 1/3] gitweb: Mark boundary commits in 'blame' view Jakub Narebski
2009-07-10 21:57 ` [PATCH 2/3] gitweb: Use "previous" header of git-blame -p " Jakub Narebski
2009-07-10 22:21 ` Junio C Hamano
2009-07-11 9:17 ` Jakub Narebski
2009-07-12 17:21 ` Luben Tuikov
2009-07-14 19:21 ` Jakub Narebski
2009-07-10 22:01 ` [PATCH 3/3] gitweb: Add author initials in 'blame' view, a la "git gui blame" Jakub Narebski
2009-07-11 16:56 ` [PATCH 0/3] gitweb: 'blame' view improvements Jakub Narebski
2009-07-13 19:08 ` [RFC PATCH 5/3] gitweb: Incremental blame (proof of concept) Jakub Narebski
2009-07-12 22:08 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907130008.46168.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).