From: Mischa POSLAWSKY Date: Wed, 4 Feb 2015 09:25:33 +0000 (+0100) Subject: browser: additional footer row with browser families X-Git-Tag: v1.6~11 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/1f0b91c9e5d48128a3a62a1d75a0d047e66351fc browser: additional footer row with browser families --- diff --git a/base.css b/base.css index 1246519..3db71e8 100644 --- a/base.css +++ b/base.css @@ -223,6 +223,7 @@ thead th, td { /* table headers */ th, +tfoot td, thead td { border: 0; background: transparent !important; @@ -245,6 +246,9 @@ th { font-size: 70%; text-transform: uppercase; } +tfoot .cat th { + border-top: 1px solid #888; +} /* digraphs map */ diff --git a/browser.plp b/browser.plp index bd6d8ab..322fa36 100644 --- a/browser.plp +++ b/browser.plp @@ -240,7 +240,22 @@ for my $browser (@browsers) { } print '' x 1; say ''; -say '', $header, ''; +say '', $header; +{ + # prefix indicates browser family; count adjacent families + my (@families, %familycount); + for my $browser (@browsers) { + my $family = $caniuse->{agents}->{$browser}->{prefix}; + push @families, $family unless $familycount{$family}; + $familycount{$family} += @{ $versions{$browser} }; + } + + print "\n", ''; + print '' x 3; + printf '%s', $familycount{$_}, $_ for @families; + print ''; +} +say ''; sub featurescore { # relative amount of support for given feature