From 1f0b91c9e5d48128a3a62a1d75a0d047e66351fc Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 4 Feb 2015 10:25:33 +0100 Subject: [PATCH] browser: additional footer row with browser families --- base.css | 4 ++++ browser.plp | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) 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 -- 2.30.0