Bug 10777: (follow-up) improve CSS3 for Zebra-striping report email output

This patch improves the CSS used to attempt to Zebra-stripe the
output of emailed reports.  This will work with some email clients,
but other email clients (e.g., Gmail) don't handle style elements in the
body or head element.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2014-03-11 14:57:26 +00:00
parent 25076dec54
commit 26cdaaae77

View file

@ -244,7 +244,7 @@ foreach my $report_id (@ARGV) {
if ($email){ if ($email){
my %mail; my %mail;
if ($format eq 'html') { if ($format eq 'html') {
$message = "<html><head><style>tr:nth-child(n+1) { background-color: #ccc;}</style></head><body>$message</body></html>"; $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
%mail = ( %mail = (
To => $to, To => $to,
From => $from, From => $from,